Problem in placing the EJB queries
Hi all,
I am working on the migration of an application from J2EE to SAP WAS.
The original application contains some EJB queries present in the file sun-j2ee-ri.xml.
Entery for one of the query is given below:
<ejb20-cmp>
<sql-statement>
<operation>storeRow</operation>
<sql>UPDATE "UserEJBTable" SET "password" = ? WHERE "userName" = ? </sql>
</sql-statement>
<sql-statement>
<operation>findByPrimaryKey</operation>
<sql>SELECT "userName" FROM "UserEJBTable" WHERE "userName" = ? </sql>
</sql-statement>
</ejb20-cmp>
I cannot understand where(in which file) to make entry for this query.
Please help me out with this problem.
Hi Neethu ..
can u create one more finderMethod in ur EJB?.
then that will be dislayed in the persistent.xml files.
u can select that findermethod from Query subtab , and write ur own queries there..
not sure , u can overwrite the standard finderMethod..
Regards
Kishor Gopinatha
Similar Messages
-
HI ,
I am New to EJB. Here i am getting a problem n accessing the resoucess which are deployed in weblogic. Here i want to access the resoucess from a jsp. So i declared a web.xml. In that what i need to write. can anybody help me what i can specify in web.xml
Thank you.Stop asking the same question again and again. It will decrease your chances of actually getting some help, because your rudeness will make people angry and less inclined to help.
Your whole approach sounds wrong, but that's your problem. I'm betting that you don't need EJBs. You shouldn't write JSPs without JSTL. Totally, utterly wrong.
But if you insist, I would recommend that you actually get a book or some documentation that shows you how to call an EJB from a web app. Since you're using WebLogic, maybe reading their documentation will help:
http://edocs.bea.com/wls/docs70/webapp/components.html
% -
I want to access remote EJB from my Portal Service.
the EJB and the portal Service run on a separated machines.
here is what i wrote:
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sap.engine.services.jndi.InitialContextFactoryImpl");
properties.put(Context.PROVIDER_URL, "p030633:50004");
InitialContext context = new InitialContext(properties);
String name = "sap.com/GDS/GtinManager";
GtinManagerHome home = (GtinManagerHome)
javax.rmi.PortableRemoteObject.narrow.narrow(
context.lookup(name), GtinManagerHome.class);
gm = (GtinManager)home.create();
i run this code from java application and it works.
but in portal i get this error:
"com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Path to object does not exist at GDS, the whole lookup name is sap.com/GDS/GtinManager."
Thanks
RajaHello,
if you NW 04 SP7 or higher, please look this document
https://www.sdn.sap.com/sdn/index.sdn?contenttype=url&content=/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/how to access an ejb from a portal component.mht
else in EP6 SP2, it is more difficult to access to an EJB because the portal have an other classloader sysem and other JNDI context
Best Regards,
Fabrice -
Problem in placing the command
I am developing an application in J2ME. In the midlet I have just added an Exit command and one canvas. But the problem is that the Exit command is coming under Menu. I want it to be displayed as Exit only not under menu. Can you tell me how to overcome this? I am giving you the midlet code.
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
public class GujiMain extends MIDlet {
private MainMenuCanvas mainMenuCanvas;
public GujiMain() {
mainMenuCanvas = new MainMenuCanvas();
protected void destroyApp(boolean unconditional)throws MIDletStateChangeException {
protected void pauseApp() {
protected void startApp() throws MIDletStateChangeException {
Displayable d = mainMenuCanvas;
d.addCommand(new Command("Exit", Command.EXIT, 1));
d.setCommandListener(new CommandListener() {
public void commandAction(Command c, Displayable d) {
notifyDestroyed();
Display.getDisplay(this).setCurrent(d);
}Hi Dhiraj1983.
Your code seems to be OK. But some devices display commands under menu, some other directly. I think that is impossibile to choose this behaviour.
Regards -
Problem in placing the background in ALV Grid display
I have created one image of the business flow, and it have to be displayed in the background of ALV grid display.
For this I have gone to T.Code <b>OAER</b> , Given class name as <b>PICTURES</b> , Class type as <b>OT</b> , Object Key <b>BACKGROUND</b>, clicked on the triangle of Standard Doc , then double click on screen, and finally uploaded the background into SAP.
In the function module <b>REUSE_ALV_GRID_DISPLAY</b> I passed this background to the parameter I_BACKGROUND_ID.
It is working fine, and I was able to see the back ground in my program.
(developed in IDES)
But the same is not working in my development client, will some one suggest be the reason for the problem. Please kindly help me out from this problem.hello Dinesh,
I have created the object key in the development client itself and used in the grid display of the same client. i am not understanding where the problem is, any how thank you very much for your responce. if you have any other solution please let me know.
Thank you -
Problem in Placing the file in Archive directory
Hi,
I am trying to read a file and after processing , I want to archive and place in other directory. Though i am able to read and insert the data succesfully into database but not able to place in 'Archive' Directory.
What might be the reason any idea???
I heard there is a bug in 10.1.3.3.0 version... Is this true???
Any help in this regard would be appreciated.
Thanks,
Pallavi
Message was edited by:
user614169
Message was edited by:
user614169I don't think there is a bug related to this in 10.1.3.3
I am using SOA and JDeveloper 10.1.3.3 and its working fine
Are u checking the archive option in file adapter?( Check wsdl for entry)
Also are you giving the physical location or logical one?
try with physical path if u are not doing it already.
And also, i don't think files get archived after processing, they get archived at the same time the file adapter is in action.
Regards
Ketan -
Problem of openning the queries.
Dear experts,
I have a problem in openning the existant queries.
The BEX analyse shows the infomation as "No entry" when i tried to open a query.
And then i did some tests. I found that
when i delete a query, (ex:
Name: BtoB: Search for the new materials
Technical Name: BPS_Test_V001.)
And I then open another query and modify it and to save it again as
(BtoB: Search the new materials
Technical Name: BPS_Test_V001) . The system allow me to save it like that(i changed a bit the query's name). But after i close it, i could not open it again.
Did anybody also meet such problem? And why?
ThanksHi,
we have been facing such kind of issues that were caused by technical names / descriptions that were too long. Please try to save with short description / technical name, maybe you can now open your queries. This issue can be fixed with some additional .dll...
Best regards,
Björn -
Problem in placing files in server
Hello,
I am working on applet to servlet communication. I have developed the code but I have problem in placing the files in the tomcat server. these are my files
test.html
test.class (applet)
inter.class (bean implementing serializable interface)
testser.class (servlet)
I have placed test.html, test.class and inter.class in webapps/examples folder. I have placed testser.class in webapps/examples/web-inf/classes folder.
So that i can now see the applet and applet pass values to bean. But my servlet is not called. Can any one help what is going wrong or where should i place the files?
ThanksHello,
Here goes my source code files. All of them are working source files,
I am a bit confused in placing them in the Tomcat server. Can anyone try and post the results please?
i.e placing the files in the proper directories of the server.
// Register.java
import java.sql.*;
public class Register implements java.io.Serializable
// data members
private String firstname;
private String lastname;
private final String CR = "\n"; // carriage return
// constructors
public Register()
public Register(String afirstName, String alastName)
firstname = afirstName;
lastname = alastName;
RegistrationServlet regser = new RegistrationServlet();
public String getFirstName()
System.out.println("In getFirstName(): " + firstname);
return firstname;
public String getLastName()
return lastname;
// RegistrationApplet.html
import java.awt.*;
import java.applet.*;
import java.net.*;
import java.awt.event.*;
import java.io.*;
public class RegistrationApplet extends Applet implements ActionListener
String browser;
public void init()
setLayout(null);
setSize(438,536);
label1.setText("First Name*:");
add(label1);
label1.setFont(new Font("Dialog", Font.BOLD, 12));
label1.setBounds(48,60,116,27);
add(textField1);
textField1.setBounds(168,60,180,30);
add(textField2);
textField2.setBounds(168,96,180,30);
label2.setText("Last Name*:");
add(label2);
label2.setFont(new Font("Dialog", Font.BOLD, 13));
label2.setBounds(48,96,94,20);
button1.setLabel("Submit");
add(button1);
button1.setBackground(java.awt.Color.lightGray);
button1.setBounds(120,444,98,30);
label11.setText("Applet to Servlet Communication");
add(label11);
label11.setFont(new Font("Dialog", Font.BOLD, 24));
label11.setBounds(108,12,288,36);
button1.addActionListener(this);
public void actionPerformed(ActionEvent ae)
if(ae.getSource().equals(button1))
firstname = textField1.getText().trim();
lastname = textField2.getText().trim();
try{
String toservlet = "http://localhost:8080/servlet/RegistrationServlet";
URL servleturl = new URL(toservlet);
URLConnection servletconnection = servleturl.openConnection();
servletconnection.setDoInput(true);
servletconnection.setDoOutput(true);
servletconnection.setUseCaches(false);
servletconnection.setDefaultUseCaches(false);
servletconnection.setRequestProperty("Content-type","application/octet-stream");
// sending the values to the serialised class "Register.java"
register = new Register(firstname,lastname);
ObjectOutputStream outputtoservlet = null;
outputtoservlet = new ObjectOutputStream(servletconnection.getOutputStream());
outputtoservlet.writeObject(register);
outputtoservlet.flush();
outputtoservlet.close();
catch(Exception e)
System.out.println("in submit "+e);
e.printStackTrace();
String firstname;
String lastname;
java.awt.Label label1 = new java.awt.Label();
java.awt.TextField textField1 = new java.awt.TextField();
java.awt.TextField textField2 = new java.awt.TextField();
java.awt.Label label2 = new java.awt.Label();
java.awt.Button button1 = new java.awt.Button();
java.awt.Label label11 = new java.awt.Label();
String parameters;
Register register = null;
// RegistrationServlet.java
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.net.*;
import java.io.*;
public class RegistrationServlet extends HttpServlet
public void doPost(HttpServletRequest req,HttpServletResponse res)
ObjectInputStream inputFromApplet = null;
Register aRegister = null;
try
inputFromApplet = new ObjectInputStream(req.getInputStream());
//"Reading data..."
System.out.println("Reading Data.......");
aRegister = (Register) inputFromApplet.readObject();
System.out.println("Completed Reading Data.......");
//close the connection after reading the data
inputFromApplet.close();
// getting parameters from the serilized class "Register.java"
String first = aRegister.getFirstName();
String last = aRegister.getLastName();
ServletOutputStream sos = res.getOutputStream();
sos.println("First Name:"+first);
sos.println("Last Name:"+last);
catch(Exception e)
System.out.println("in doPost() "+e);
//e.printStackTrace();
}Thanks -
Problem compiling Web Service EJB endpoint - URGENT
I was compiling a simple HelloWorld SLSB as an EJB Endpoints. The problem is with the ejb-jar.xml when compiler encounters xmlns namespace dec -
<ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" version="2.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
I tried compiling this guy using weblogic builtin ant utlity from the example, then I tried using weblogic.ejbc but all are in vain.
Please suggest, how to get rid of this problem.
Thanks
xgr3no, it's just like invoking any other webservice.
That's why it's called a WEBSERVICE ENDPOINT to the EJB, and not an EJB ENDPOINT to a webservice. -
I Cannot Add the EJB developed in JSE 8.1 in JSC2
Hi
I have problem for add the ejb into the Studio Creator...
I was trying to add several times and some times return 2 differents messages of errors I'm attaching the last message.
I did can make 1 time to add the ejb but when try to update because add more methods It was impossible to add
java.lang.reflect.UndeclaredThrowableException
at $Proxy19.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
at java.awt.Dialog$1.run(Dialog.java:515)
at java.awt.Dialog.show(Dialog.java:536)
at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:800)
at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:843)
at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:831)
at org.openide.util.Mutex.doEventAccess(Mutex.java:1044)
at org.openide.util.Mutex.readAccess(Mutex.java:170)
at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:816)
at java.awt.Component.show(Component.java:1300)
at java.awt.Component.setVisible(Component.java:1253)
at com.sun.rave.ejb.ui.AddEjbGroupDialog.showDialog(AddEjbGroupDialog.java:94)
at com.sun.rave.ejb.actions.AddEjbGroupAction.performAction(AddEjbGroupAction.java:40)
at org.openide.util.actions.NodeAction$3.run(NodeAction.java:450)
at org.openide.util.actions.CallableSystemAction.doPerformAction(CallableSystemAction.java:116)
at org.openide.util.actions.NodeAction$DelegateAction.actionPerformed(NodeAction.java:448)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.openide.util.WeakListenerImpl$ProxyListener.invoke(WeakListenerImpl.java:383)
... 64 more
Caused by: java.lang.ClassCastException: javax.swing.tree.DefaultMutableTreeNode
at com.sun.rave.ejb.ui.ConfigureMethodsPanel$1.getTreeCellRendererComponent(ConfigureMethodsPanel.java:56)
at javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.getNodeDimensions(BasicTreeUI.java:2693)
at javax.swing.tree.AbstractLayoutCache.getNodeDimensions(AbstractLayoutCache.java:475)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.updatePreferredSize(VariableHeightLayoutCache.java:1342)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1469)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1270)
at javax.swing.tree.VariableHeightLayoutCache.rebuild(VariableHeightLayoutCache.java:725)
at javax.swing.tree.VariableHeightLayoutCache.setModel(VariableHeightLayoutCache.java:91)
at javax.swing.plaf.basic.BasicTreeUI.setModel(BasicTreeUI.java:400)
at javax.swing.plaf.basic.BasicTreeUI$Handler.propertyChange(BasicTreeUI.java:3384)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:270)
at java.awt.Component.firePropertyChange(Component.java:7159)
at javax.swing.JTree.setModel(JTree.java:710)
at com.sun.rave.ejb.ui.ConfigureMethodsPanel.setEjbGroup(ConfigureMethodsPanel.java:81)
at com.sun.rave.ejb.ui.ConfigureMethodsPanel.<init>(ConfigureMethodsPanel.java:73)
at com.sun.rave.ejb.ui.AddEjbGroupDialog$ConfigureMethodWizardPanel.getComponent(AddEjbGroupDialog.java:312)
at org.openide.WizardDescriptor.updateState(WizardDescriptor.java:577)
at org.openide.WizardDescriptor.goToNextStep(WizardDescriptor.java:691)
at org.openide.WizardDescriptor.access$500(WizardDescriptor.java:63)
at org.openide.WizardDescriptor$Listener.actionPerformed(WizardDescriptor.java:1296)
[catch] ... 69 more
==>
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.openide.util.WeakListenerImpl$ProxyListener.invoke(WeakListenerImpl.java:383)
at $Proxy19.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
at java.awt.Dialog$1.run(Dialog.java:515)
at java.awt.Dialog.show(Dialog.java:536)
at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:800)
at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:843)
at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:831)
at org.openide.util.Mutex.doEventAccess(Mutex.java:1044)
at org.openide.util.Mutex.readAccess(Mutex.java:170)
at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:816)
at java.awt.Component.show(Component.java:1300)
at java.awt.Component.setVisible(Component.java:1253)
at com.sun.rave.ejb.ui.AddEjbGroupDialog.showDialog(AddEjbGroupDialog.java:94)
at com.sun.rave.ejb.actions.AddEjbGroupAction.performAction(AddEjbGroupAction.java:40)
at org.openide.util.actions.NodeAction$3.run(NodeAction.java:450)
at org.openide.util.actions.CallableSystemAction.doPerformAction(CallableSystemAction.java:116)
at org.openide.util.actions.NodeAction$DelegateAction.actionPerformed(NodeAction.java:448)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by: java.lang.ClassCastException: javax.swing.tree.DefaultMutableTreeNode
at com.sun.rave.ejb.ui.ConfigureMethodsPanel$1.getTreeCellRendererComponent(ConfigureMethodsPanel.java:56)
at javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.getNodeDimensions(BasicTreeUI.java:2693)
at javax.swing.tree.AbstractLayoutCache.getNodeDimensions(AbstractLayoutCache.java:475)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.updatePreferredSize(VariableHeightLayoutCache.java:1342)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1469)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1270)
at javax.swing.tree.VariableHeightLayoutCache.rebuild(VariableHeightLayoutCache.java:725)
at javax.swing.tree.VariableHeightLayoutCache.setModel(VariableHeightLayoutCache.java:91)
at javax.swing.plaf.basic.BasicTreeUI.setModel(BasicTreeUI.java:400)
at javax.swing.plaf.basic.BasicTreeUI$Handler.propertyChange(BasicTreeUI.java:3384)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:270)
at java.awt.Component.firePropertyChange(Component.java:7159)
at javax.swing.JTree.setModel(JTree.java:710)
at com.sun.rave.ejb.ui.ConfigureMethodsPanel.setEjbGroup(ConfigureMethodsPanel.java:81)
at com.sun.rave.ejb.ui.ConfigureMethodsPanel.<init>(ConfigureMethodsPanel.java:73)
at com.sun.rave.ejb.ui.AddEjbGroupDialog$ConfigureMethodWizardPanel.getComponent(AddEjbGroupDialog.java:312)
at org.openide.WizardDescriptor.updateState(WizardDescriptor.java:577)
at org.openide.WizardDescriptor.goToNextStep(WizardDescriptor.java:691)
at org.openide.WizardDescriptor.access$500(WizardDescriptor.java:63)
at org.openide.WizardDescriptor$Listener.actionPerformed(WizardDescriptor.java:1296)
[catch] ... 69 more
==>
java.lang.ClassCastException: javax.swing.tree.DefaultMutableTreeNode
at com.sun.rave.ejb.ui.ConfigureMethodsPanel$1.getTreeCellRendererComponent(ConfigureMethodsPanel.java:56)
at javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.getNodeDimensions(BasicTreeUI.java:2693)
at javax.swing.tree.AbstractLayoutCache.getNodeDimensions(AbstractLayoutCache.java:475)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.updatePreferredSize(VariableHeightLayoutCache.java:1342)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1469)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1270)
at javax.swing.tree.VariableHeightLayoutCache.rebuild(VariableHeightLayoutCache.java:725)
at javax.swing.tree.VariableHeightLayoutCache.setModel(VariableHeightLayoutCache.java:91)
at javax.swing.plaf.basic.BasicTreeUI.setModel(BasicTreeUI.java:400)
at javax.swing.plaf.basic.BasicTreeUI$Handler.propertyChange(BasicTreeUI.java:3384)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:270)
at java.awt.Component.firePropertyChange(Component.java:7159)
at javax.swing.JTree.setModel(JTree.java:710)
at com.sun.rave.ejb.ui.ConfigureMethodsPanel.setEjbGroup(ConfigureMethodsPanel.java:81)
at com.sun.rave.ejb.ui.ConfigureMethodsPanel.<init>(ConfigureMethodsPanel.java:73)
at com.sun.rave.ejb.ui.AddEjbGroupDialog$ConfigureMethodWizardPanel.getComponent(AddEjbGroupDialog.java:312)
at org.openide.WizardDescriptor.updateState(WizardDescriptor.java:577)
at org.openide.WizardDescriptor.goToNextStep(WizardDescriptor.java:691)
at org.openide.WizardDescriptor.access$500(WizardDescriptor.java:63)
at org.openide.WizardDescriptor$Listener.actionPerformed(WizardDescriptor.java:1296)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.openide.util.WeakListenerImpl$ProxyListener.invoke(WeakListenerImpl.java:383)
at $Proxy19.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
[catch] at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
at java.awt.Dialog$1.run(Dialog.java:515)
at java.awt.Dialog.show(Dialog.java:536)
at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:800)
at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:843)
at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:831)
at org.openide.util.Mutex.doEventAccess(Mutex.java:1044)
at org.openide.util.Mutex.readAccess(Mutex.java:170)
at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:816)
at java.awt.Component.show(Component.java:1300)
at java.awt.Component.setVisible(Component.java:1253)
at com.sun.rave.ejb.ui.AddEjbGroupDialog.showDialog(AddEjbGroupDialog.java:94)
at com.sun.rave.ejb.actions.AddEjbGroupAction.performAction(AddEjbGroupAction.java:40)
at org.openide.util.actions.NodeAction$3.run(NodeAction.java:450)
at org.openide.util.actions.CallableSystemAction.doPerformAction(CallableSystemAction.java:116)
at org.openide.util.actions.NodeAction$DelegateAction.actionPerformed(NodeAction.java:448)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)Hi Eric,
What's the result of Arnav's question?
How did you set it? Please set it as the following steps:
1.Go to Start > Administrative Tools > Task Scheduler
2.In the Task Scheduler window double click your task, and on the "General" tab, under "Security options" section, click the "Change User or Group" button.
4.Make sure "From this location" is set to the local machine name (to change click "Locations" button and select the local computer name)
5.Type "SYSTEM" in the text box and press ok . Under "When running the task, use the following user account:" you should see "NT AUTHORITY\SYSTEM".
Karen Hu
TechNet Community Support -
Queries are not getting executed in the EJB
Hi,
I am using Stateless EJB for database transactions. I have one getConnection() method in it which I am calling in every method for connection. I have created one more method in that I am executing one simple query for count(*) from one table and returning the count in the Web dynpro application. But I am not getting the count. It seems the query is not getting executed. I have added classes12 jar externally to the EJB and also to the WebDynpro application. Is there anything I am missing????
Thanks,
Swati GaurHi Swati Gaur,
Did you print any logs in the your code to print the count after executing the query?
For debugging purpose you can try
System.err.println("Count after executing the query "+count);
count is the variable which contains the count after executing the sql query.
Check for the above statement in default trace. If count is printing in default trace then the problem is in your webdynpro code.
Hope this helps!
Regards,
Jaya. -
Problem in solving the alias name in queries.
hello
I have an application which utilizes a query to take data from a database table & write to an XML file and vice-versa. I have a problem in solving the alias name in queries.
e.g Select EmpID as EmployeeID from Employee.. Where EmpID is the original Column name in Table, and when i have the result set metadata, i am not able to get the Original Column name EmpID? is there any other way to get it? or it is b'cos of the JDBC driver?
i have tried using:
rsmd.getColumnLabel(int position) ==> gives EmployeeID rsmd.getColumnName(int position) ==> gives EmployeeID and not EmpID
Kindly help.
ThanksHi,
When you alias the column, you are giving it a new name to the result set. You can use the metadata to get to the actual column name
ResultSetMetaData rsmd = rs.getMetaData();
String colname = rsmd.getColumnName(i);
Here " i " is the index for the column.
Hope this will help you.
Anil.
Developer Technical Support
Sun Microsystems Inc,
http://www.sun.com/developers/support -
I have a problem when i open the ejb-jar.xml
Hi All,
I have a problem when i open the ejb-jar.xml.....
It shows some problem like .....
when Invoking Code plug-in problem :Org.eclipse.jface.
After updating my nwds 3 to 11.
How can i solve this any body help me.
regards
BHIMaybe try hosting your image on a free image hosting site.
-
Problem in assigning the execute queue to EJB.
I have a enterprise application in that a have many web application.I want to assign
the low priority threads to one web application e.g. "A". The "A" is using one
ejb to execute the some task.
I am making a execute queue with name let "TestQueue"
and assigning it to my servlet thru these entries in
weblogic-ejb-jar :-
<weblogic-enterprise-bean>
<ejb-name>InferenceEngine</ejb-name>
<reference-descriptor>
<resource-description>
<res-ref-name>jdbc/MyDB</res-ref-name>
<jndi-name>jdbc/MyDB</jndi-name>
</resource-description>
</reference-descriptor>
<jndi-name>ejb/InferenceEngine</jndi-name>
<dispatch-policy>TestQueue</dispatch-policy>
</weblogic-enterprise-bean>
Here is my code of config.xml file for execute queue.
<?xml version="1.0" encoding="UTF-8"?>
<Domain ConfigurationVersion="8.1.0.0" Name="ACM_1">
<Server ListenAddress="" ListenPort="8003" Name="ACM"
NativeIOEnabled="true" ReliableDeliveryPolicy="RMDefaultPolicy" ServerVersion="8.1.1.0">
<SSL Enabled="false" HostnameVerificationIgnored="false"
IdentityAndTrustLocations="KeyStores" Name="ACM"/>
<ExecuteQueue Name="TestQueue" ThreadPriority="1"/>
</Server>
I tried the ejbc command line argument -dispatchPolicy TestQueue also. But it
is also not sending request to my TestQueue.One thing to note is the execute queue is chosen when the request enters
the server. So if a webapp is assigned to Queue-1 and an ejb to
Queue-2, and the webapp calls the ejb, the request will remain on queue-1.
-- Rob
Sunil Kumar Mehta wrote:
I have a enterprise application in that a have many web application.I want to assign
the low priority threads to one web application e.g. "A". The "A" is using one
ejb to execute the some task.
I am making a execute queue with name let "TestQueue"
and assigning it to my servlet thru these entries in
weblogic-ejb-jar :-
<weblogic-enterprise-bean>
<ejb-name>InferenceEngine</ejb-name>
<reference-descriptor>
<resource-description>
<res-ref-name>jdbc/MyDB</res-ref-name>
<jndi-name>jdbc/MyDB</jndi-name>
</resource-description>
</reference-descriptor>
<jndi-name>ejb/InferenceEngine</jndi-name>
<dispatch-policy>TestQueue</dispatch-policy>
</weblogic-enterprise-bean>
Here is my code of config.xml file for execute queue.
<?xml version="1.0" encoding="UTF-8"?>
<Domain ConfigurationVersion="8.1.0.0" Name="ACM_1">
<Server ListenAddress="" ListenPort="8003" Name="ACM"
NativeIOEnabled="true" ReliableDeliveryPolicy="RMDefaultPolicy" ServerVersion="8.1.1.0">
<SSL Enabled="false" HostnameVerificationIgnored="false"
IdentityAndTrustLocations="KeyStores" Name="ACM"/>
<ExecuteQueue Name="TestQueue" ThreadPriority="1"/>
</Server>
I tried the ejbc command line argument -dispatchPolicy TestQueue also. But it
is also not sending request to my TestQueue. -
Having problem access the EJB 3 from Web Component
Hi ,
I have an EJB 3 entity AuctionItem and a session ItemProcessor only implements the local interface IItemProcessor, then I use a servlet to access the findAll method in the ItemProcessor. I've created a Enterprise Applicaiton project to contain the ejb jar and the war file, but after I deploy the ear successfully, I couldn't access to my servlet through http://localhost:8080/AuctionWeb/AuctionServlet, it keeps giving me error like follwoing. Do you know why, your help will be very appreciated !
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
java.lang.NullPointerException
at web.AuctionServlet.doGet(AuctionServlet.java:43)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
My code sample:
public class AuctionServlet extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
@EJB
private IItemProcessor itemProcessor;
public AuctionServlet() {
super();
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet AuctionServlet</title>");
out.println("</head>");
out.println("<body>");
out.println("<h1>Servlet AuctionServlet at " + request.getContextPath () + "</h1>");
List items = itemProcessor.findAll();
for (Iterator it = items.iterator(); it.hasNext();) {
AuctionItem elem = (AuctionItem) it.next();
out.println(" <b>"+elem.getItemid()+" </b><br />");
out.println(elem.getTitle()+"<br /> ");
out.println("</body>");
out.println("</html>");
.....And the session bean is :
package sessions;
import javax.annotation.Resource;
import javax.ejb.Local;
import javax.ejb.Stateless;
import javax.persistence.*;
import javax.sql.DataSource;
import java.util.List;
import entities.AuctionItem;
@Stateless(name = "ItemProcessor")
public class ItemProcessor implements sessions.IItemProcessor {
@PersistenceContext
EntityManager entityManager;
public Long createItem(String title, Double value, String description,
String status) {
AuctionItem item = new AuctionItem();
item.setTitle(title);
item.setValue(value);
item.setDescription(description);
item.setStatus(status);
entityManager.persist(item);
return item.getItemid();
public String findItemByKey(Long id) {
AuctionItem item = entityManager.find(AuctionItem.class, id);
return item.getTitle();
public List findAll() {
return entityManager.createQuery("select object(o) from AuctionItem as o").getResultList();
}The most common reason for this failure is if your web.xml does not refer to the latest web application
.xsd :
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http
://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/x
ml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
Otherwise, the web application is considered to be a J2EE 1.4 application and annotations
are not processed. If that's not the case you can also run the application through the
verifier to see if it identifies any issues.
Maybe you are looking for
-
How to change the default login page
Hi All, I got an issue with the login page. I want to display the Chinses as default, but now it's engish. I have changed the ICX: Language to Chinese at the site level, but it seems didn't take effect. And the parameter s_base_lang is still US in th
-
What is the best method for backing up movies?
I've been using Handbrake to rip out movies that I OWN so I can watch them on my apple tv. Everything works great, I'm just wondering what the best way to back up these files is. Any ideas? I own about 400 DVD's and would like to have them all in my
-
Is the new macbook pro with retina display available now in apple retail stores?
Is the new macbook pro with retina display available now in apple retail stores? im going to miami tomorrow and staying there till the 27 of june and I want to buy one but dont know were...
-
Hello, I'm newly working with Premiere, I haven't used it in a few years because I've been working with Final Cut. But I'm having a problem with keyframes. I don't know if it is just not smooth or if its a glitch but my motion through keyframes boun
-
I teach kids who've failed to learn to read at school. I can't figure out how to start a quiz page and enlarge the text greatly, move the locations of the three words I'm comparing, and use a smiley face for the right answer. It's beyond me at this p