How to avaoid java.lang.IllegalArgumentException: No enum const class

HI ,
Iam getting java.lang.IllegalArgumentException when iam using switch case through Enum contants.
//Enum Constants declaration
public enum USEOFPROCEEDSVALUES { U1,U2,U3, U4}
//Using Enum in Java class
Test.java
USEOFPROCEEDSVALUES useOfProceedsVar =USEOFPROCEEDSVALUES.valueOf(useOfproceeds);
switch (useOfProceedsVar) {   
               case U1:
               revenueSourceCode="REVENUE_SOURCE_CODE.POWER";
                    break;
               case U2:
                    revenueSourceCode="REVENUE _SOURCE_CODE.WATER";
               break;
               case U3:
                    revenueSourceCode="REVENUE_SOURCE_CODE.POWER";
                    break;
               case U4:
                         revenueSourceCode=REVENUE_SOURCE_CODE.POWER";
                    break;
default:
                    revenueSourceCode=null;
Exception raising if there is either of these not U1,U2,U3,U4 ara not avalabele. i.e is if useOfProceedsVar is A6 then exception raising
How to avoid this exception
Thanks for early reply

user818909 wrote:
HI ,
Iam getting java.lang.IllegalArgumentException when iam using switch case through Enum contants.
//Enum Constants declaration
public enum USEOFPROCEEDSVALUES { U1,U2,U3, U4}
//Using Enum in Java class
Exception raising if there is either of these not U1,U2,U3,U4 ara not avalabele. i.e is if useOfProceedsVar is A6 then exception raisingActually useOfProceedsVar can never be A6, it can only take a value from the enum.
The exception will be raised by valueOf, which (quite correctly) throws it if the String you pass to it doesn't match any of the enum constants.
>
How to avoid this exception
Don't avoid it, process it. What do you want your code to do if the string doesn't match any of your enum constants? Whatever it is, stick it in a catch clause.

Similar Messages

  • How to solve this? java.lang.IllegalArgumentException problem

    The midlet compliled successfully..
    Once run,
    I enter 3 different records...
    then after when I 'VIEW' for example I enter recordID: 1..
    by right, all the details about recordId : 1 would be listed out...somehow, this error pops up.
    java.lang.IllegalArgumentException
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.rms.*;
    * @author RyanLCC
    public class cdSeller extends MIDlet implements CommandListener{
    private Display display;
    private Form form;
    private Command add, view, update, delete, exit;
    private TextField rcdId, title, quantity, price, profit, director, publish, actors;
    private RecordStore rs;
    private Alert alert = new Alert("New Data Added !!!");
    private Alert alert1 = new Alert("Database Upated!!!");
    private Alert alert2 = new Alert("Record Deleted!!!");
    private Alert alert3 = new Alert("Looking Data!!!");
    public cdSeller()throws RecordStoreException{
    display = Display.getDisplay(this);
    exit = new Command("Exit", Command.EXIT, 1);
    add = new Command("Add",Command.SCREEN,2);
    update = new Command("Update",Command.SCREEN,2);
    delete = new Command("Delete",Command.SCREEN,2);
    view = new Command("View",Command.SCREEN,2);
    rcdId= new TextField("Record ID :","",5,TextField.NUMERIC);
    title= new TextField("Title :","",11,TextField.ANY);
    quantity= new TextField("Quantity :","",8,TextField.NUMERIC);
    price= new TextField("Retail price :","",8,TextField.ANY);
    profit= new TextField("Profit margin:","",8,TextField.ANY);
    director= new TextField("Director :","",11,TextField.ANY);
    publish= new TextField("Publisher :","",11,TextField.ANY);
    actors= new TextField("Actors :","",11,TextField.ANY);
    rs = RecordStore.openRecordStore("My CD Datbase Directory", true);
    form = new Form("My CD Database");
    form.append(rcdId);
    form.append(title);
    form.append(quantity);
    form.append(price);
    form.append(profit);
    form.append(director);
    form.append(publish);
    form.append(actors);
    form.addCommand(exit);
    form.addCommand(add);
    form.addCommand(update);
    form.addCommand(delete);
    form.addCommand(view);
    form.setCommandListener(this);
    public void startApp() {
    display.setCurrent(form);
    public void pauseApp() {
    public void destroyApp(boolean unconditional) {
    try {
    rs.closeRecordStore();
    } catch (RecordStoreException ex) {
    ex.printStackTrace();
    public void commandAction(Command c, Displayable d) {
    alert.setTimeout(3000);
    alert1.setTimeout(3000);
    String str;
    byte bytes[];
    int recordID;
    try{
    if(c==add){
    str = title.getString()+":"+quantity.getString()+
    ":"+price.getString()+":" +profit.getString()+
    ":"+director.getString()+":"+publish.getString ()+
    ":"+actors.getString();
    bytes=str.getBytes();
    recordID = rs.addRecord(bytes, 0, bytes.length);
    System.out.println("Record of ID:"+recordID+" is added");
    Display.getDisplay(this).setCurrent(alert);
    }else if(c==update){
    recordID = Integer.parseInt(rcdId.getString());
    str = title.getString()+":"+quantity.getString()+
    ":"+price.getString()+":" +profit.getString()+
    ":"+director.getString()+":"+publish.getString ()+
    ":"+actors.getString();
    bytes=str.getBytes();
    rs.setRecord(recordID, bytes, 0, bytes.length);
    Display.getDisplay(this).setCurrent(alert1);
    }else if(c == delete){
    recordID = Integer.parseInt(rcdId.getString());
    rs.deleteRecord(recordID);
    Display.getDisplay(this).setCurrent(alert2);
    }else if(c == view ){
    recordID = Integer.parseInt(rcdId.getString());
    bytes = new byte[rs.getRecordSize(recordID)];
    rs.getRecord(recordID,bytes,0);
    String str1 = new String(bytes);
    int index = str1.indexOf(":");
    title.setString(str1.substring(0));
    quantity.setString(str1.substring(1));
    price.setString(str1.substring(2));
    profit.setString(str1.substring(3));
    director.setString(str1.substring(4));
    publish.setString(str1.substring(5));
    actors.setString(str1.substring(6));
    }else if( c == exit){
    destroyApp(true);
    notifyDestroyed();
    }catch(Exception e){
    e.printStackTrace();
    }

    *To change this template, choose Tools | Templates*
    and open the template in the editor.
    *import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;*
    *import javax.microedition.rms.*;
    *@author RyanLCC*
    public class CdSeller extends MIDlet implements CommandListener{
        private Display display;
        private Form form;
        private Command add, view, update, delete, exit;
        private TextField rcdId, title, quantity, price, profit, director, publish, actors;
        private RecordStore rs;
        private Alert alert = new Alert("New Data Added !!!");
        private Alert alert1 = new Alert("Database Upated!!!");
        private Alert alert2 = new Alert("Record Deleted!!!");
        private Alert alert3 = new Alert("Looking Data!!!");
        public CdSeller()throws RecordStoreException{
        display = Display.getDisplay(this);
        exit = new Command("Exit", Command.EXIT, 1);
        add = new Command("Add",Command.SCREEN,2);
        update = new Command("Update",Command.SCREEN,2);
        delete = new Command("Delete",Command.SCREEN,2);
        view = new Command("View",Command.SCREEN,2);
        rcdId= new TextField("Record ID     :","",5,TextField.NUMERIC);
        title= new TextField("Title         :","",11,TextField.ANY);
        quantity= new TextField("Quantity   :","",8,TextField.ANY);
        price= new TextField("Retail price  :","",8,TextField.ANY);
        profit= new TextField("Profit margin:","",8,TextField.ANY);
        director= new TextField("Director   :","",11,TextField.ANY);
        publish= new TextField("Publisher   :","",11,TextField.ANY);
        actors= new TextField("Actors       :","",11,TextField.ANY);
        rs = RecordStore.openRecordStore("My CD Datbase Directory", true);
        form = new Form("My CD Database");
        form.append(rcdId);
        form.append(title);
        form.append(quantity);
        form.append(price);
        form.append(profit);
        form.append(director);
        form.append(publish);
        form.append(actors);
        form.addCommand(exit);
        form.addCommand(add);
        form.addCommand(update);
        form.addCommand(delete);
        form.addCommand(view);
        form.setCommandListener(this);
        public void startApp() {
            display.setCurrent(form);
        public void pauseApp() {
        public void destroyApp(boolean unconditional) {
            try {
                rs.closeRecordStore();
            } catch (RecordStoreException ex) {
                ex.printStackTrace();
        public void commandAction(Command c, Displayable d) {
            alert.setTimeout(3000);
            alert1.setTimeout(3000);
            String str;
            byte bytes[];
            int recordID;
            try{
                if(c==add){
                    str = title.getString()+":"+quantity.getString()+
                          ":"+price.getString()+":" +profit.getString()+
                          ":"+director.getString()+":"+publish.getString()+
                          ":"+actors.getString();+
    +                bytes=str.getBytes();+
    +                recordID = rs.addRecord(bytes, 0, bytes.length);+
    +                System.out.println("Record of ID:"+recordID+" is added");
                    Display.getDisplay(this).setCurrent(alert);
                }else if(c==update){
                    recordID = Integer.parseInt(rcdId.getString());
                    str = title.getString()+":"+quantity.getString()+
                          ":"+price.getString()+":" +profit.getString()+
                          ":"+director.getString()+":"+publish.getString()+
                          ":"+actors.getString();+
    +                bytes=str.getBytes();+
    +                rs.setRecord(recordID, bytes, 0, bytes.length);+
    +                System.out.println("Record of ID:"+recordID+" is updated");
                    Display.getDisplay(this).setCurrent(alert1);
                }else if(c == delete){
                    recordID = Integer.parseInt(rcdId.getString());
                    rs.deleteRecord(recordID);
                    System.out.println("Record of ID:"+recordID+" is deleted");
                    Display.getDisplay(this).setCurrent(alert2);
                }else if(c == view ){
                    recordID = Integer.parseInt(rcdId.getString());
                    bytes = new byte[rs.getRecordSize(recordID)];
                    rs.getRecord(recordID,bytes,0);
                    String str1 = new String(bytes);
                    int index = str1.indexOf(":");
                    title.setString(str1.substring(0));
                    quantity.setString(str1.substring(1));
                    price.setString(str1.substring(2));
                    profit.setString(str1.substring(3));
                    director.setString(str1.substring(4));
                    publish.setString(str1.substring(5));
                    actors.setString(str1.substring(6));
            }else if( c == exit){
                destroyApp(true);
                notifyDestroyed();
        }catch(Exception e){
            e.printStackTrace();
    Starting emulator in execution mode
    Installing suite from: http://127.0.0.1:59543/RecordStore.jad
    Record of ID:1 is added
    Record of ID:2 is added
    java.lang.IllegalArgumentException
    at javax.microedition.lcdui.TextField.setCharsImpl(), bci=79
    at javax.microedition.lcdui.TextField.setString(), bci=37
    at CdSeller.commandAction(CdSeller.java:120)
    at javax.microedition.lcdui.Display$ChameleonTunnel.callScreenListener(), bci=46
    at com.sun.midp.chameleon.layers.SoftButtonLayer.processCommand(), bci=74
    at com.sun.midp.chameleon.layers.SoftButtonLayer.commandSelected(), bci=11
    at com.sun.midp.chameleon.layers.MenuLayer.pointerInput(), bci=170
    at com.sun.midp.chameleon.CWindow.pointerInput(), bci=76
    at javax.microedition.lcdui.Display$DisplayEventConsumerImpl.handlePointerEvent(), bci=19
    at com.sun.midp.lcdui.DisplayEventListener.process(), bci=296
    at com.sun.midp.events.EventQueue.run(), bci=179
    at java.lang.Thread.run(Thread.java:619)
    javacall_lifecycle_state_changed() lifecycle: event is JAVACALL_LIFECYCLE_MIDLET_SHUTDOWNstatus is JAVACALL_OK
    I had tired to change the quantity= new TextField("Quantity   :","",8,TextField.ANY);+ but still giving me the same problem...
    Here again..Thankx alot..

  • Java.lang.IllegalArgumentException: Session: null does not exist

    These days I am getting an exception (java.lang.IllegalArgumentException: Session: null does not exist) when I restart the weblogic managed server. I have a work around to get away with this error. I completely delete the dataspace from ALDSP console and redeploy the artifacts jar file. This is a tedious process. Can anyone suggest a permanent fix to resolve this issue.
    ALDSP version: 3.01
    Weblogic Server: 9.2.2
    Thanks.

    Hey ,Can you please help me?can you tell me how you resolved this issue.Our production is down due to
    java.lang.IllegalArgumentException: Session: null does not exist.
         at com.bea.dsp.management.persistence.primitives.ServerPersistencePrimitives.getDataspaceRoot(ServerPersistencePrimitives.java:118)
         at com.bea.dsp.management.persistence.primitives.ServerPersistencePrimitives.getDataspaceRoot(ServerPersistencePrimitives.java:73)
         at com.bea.dsp.management.activation.ActivationService.dataSpaceAlreadyExists(ActivationService.java:342)
         at com.bea.dsp.management.activation.ActivationService.setRequestHandlerClassLoader(ActivationService.java:206)
         at com.bea.ld.server.bootstrap.RequestHandlerListener.postStart(RequestHandlerListener.java:46)
         Truncated. see log file for complete stacktrace.
    Its urgent plz

  • Java.lang.IllegalArgumentException when trying to create debug setting

    Hello all,
    I have just performed an install of EHP1 on a W2K3 EE machine, and I'm trying to setup to debug my Web Dynpro app on the Java server.  I have defined the system instance correctly SAP AS Java in the Window --> Preferences --> SAP AS Java section. My Web Dynpro app deploys and runs without problems.
    However, when I use Run -> Open Debug Dialog and then click on "Run on Server" and use the "New launch configuration" option, I get a message box stating "java.lang.IllegalArgumentException (check log file)".
    So I switch to Plug-in Development perspective and take a look at the log file. The exception appears in the list of messages; double-clicking the exception provides this data:
    Severity: Error
    Message: Problems occurred when invoking code from plug-in: "org.eclipse.jface".
    Exception Stack Trace:
    java.lang.IllegalArgumentException
         at org.eclipse.wst.server.core.internal.ResourceManager.getServer(ResourceManager.java:758)
         at org.eclipse.wst.server.core.ServerCore.findServer(ServerCore.java:286)
         at org.eclipse.wst.server.ui.internal.RunOnServerLaunchConfigurationTab.initializeFrom(RunOnServerLaunchConfigurationTab.java:105)
         at org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup.initializeFrom(AbstractLaunchConfigurationTabGroup.java:86)
         at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupWrapper.initializeFrom(LaunchConfigurationTabGroupWrapper.java:143)
         at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.displayInstanceTabs(LaunchConfigurationTabGroupViewer.java:784)
         at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer$8.run(LaunchConfigurationTabGroupViewer.java:658)
         at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
         at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.inputChanged(LaunchConfigurationTabGroupViewer.java:676)
         at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.setInput0(LaunchConfigurationTabGroupViewer.java:637)
         at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.setInput(LaunchConfigurationTabGroupViewer.java:613)
         at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.handleLaunchConfigurationSelectionChanged(LaunchConfigurationsDialog.java:975)
         at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog$4.selectionChanged(LaunchConfigurationsDialog.java:570)
         at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:842)
         at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
         at org.eclipse.core.runtime.Platform.run(Platform.java:857)
         at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:46)
         at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:199)
         at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:840)
         at org.eclipse.jface.viewers.StructuredViewer.handlePostSelect(StructuredViewer.java:1153)
         at org.eclipse.jface.viewers.StructuredViewer$5.widgetSelected(StructuredViewer.java:1178)
         at org.eclipse.jface.util.OpenStrategy.firePostSelectionEvent(OpenStrategy.java:250)
         at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:244)
         at org.eclipse.jface.util.OpenStrategy$3.run(OpenStrategy.java:418)
         at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
         at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:129)
         at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659)
         at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296)
         at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
         at org.eclipse.jface.window.Window.open(Window.java:796)
         at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.open(LaunchConfigurationsDialog.java:1133)
         at org.eclipse.debug.ui.DebugUITools$1.run(DebugUITools.java:387)
         at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
         at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUITools.java:391)
         at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUITools.java:333)
         at org.eclipse.debug.ui.actions.OpenLaunchDialogAction.run(OpenLaunchDialogAction.java:82)
         at org.eclipse.debug.ui.actions.OpenLaunchDialogAction.runWithEvent(OpenLaunchDialogAction.java:90)
         at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:246)
         at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
         at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:546)
         at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
         at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
         at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
         at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
         at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
         at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
         at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
         at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
         at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
         at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
         at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
         at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
         at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
         at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
         at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
         at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
         at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
         at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
         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.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
         at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
         at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
         at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
    Session Data:
    eclipse.buildId=M20080221-1800
    I've done some hunting around the internet for this error and I did find a problem that looks quite similar under a JBOSS forum: https://jira.jboss.org/jira/browse/JBIDE-3689 ("Creating new run configuration of type Run in Server fails with exception, jbds eclipse.buildId=1.1.0.GA"). The information presented there is almost exactly what I'm seeing:
    <cut>
    Steps to Recreate:
    1. From Run menu, select "Open Run Dialog..." or "Open Debug Dialog..."
    2. Right click on "Run on Server"
    3. Select "New"
    What you see is an "Error" dialog of Reason "java.lang.IllegalArgumentException".
    The error log records the following:
    Error
    Thu Jan 29 08:13:48 PST 2009
    Problems occurred when invoking code from plug-in: "org.eclipse.jface".
    </cut>
    In the JBOSS case, the response is:
    <cut>
    It is is a known bug in WTP 2.x and in WTP 3.x this option does not exist anymore thus you should just use Run As -> Run in Server.
    Marked as out of date since latest version of WTP 3 has the fix.
    </cut>
    I have the EHP1 installed on a couple other servers where this is not happening. Anyone run into this before?
    Alternatively, anyone know how I can check the WTP of the SAP-specific eclipse released as the EHP1 developer studio?
    Thanks very much,
    Andy

    Hi Andy,
    I think there is a very siple proces which you need to follow for debug. Please have a look:-
    Please check you mentioned the correct server and instance name. As you are saying that all you applications are running fine therefore I think you would have mentioned all the required parameters correctly.
    After checking all these things, follow the steps below:-
    1) From the menu in NWDS -> Click on the Debug symbol. Select "Open Debug Dialoug".
    2) Right click on the "Remote Java Application" and select New.
    3) Clickon the Source tab. Check whether you application is included under the Defualt folder. Only those projects will be debugged which are under this folder.
    4) If you application is not there. Click on Add-> Java Project -> Select your Project - > OK. Doing this will add your project in debug instance.
    5) Go to Connect tab. Mention the Host name (Same as server name you have mentioned under Window --> Preferences --> SAP AS Java ) AND the Message server port. Please note that this server port is diffrent from the http port.
    6) Just click on Debug.
    I hope after all these steps debug should work. If not please revert back.
    Thanks and Regards,
    Pravesh

  • Error processing XML request, java.lang.IllegalArgumentException

    Hi all,
    In my code I can successfully connect to server and send the content which is an XML content:
    param = java.net.URLEncoder.encode(s, "UTF-8");
    java.io.PrintWriter out = new java.io.PrintWriter(connection.getOutputStream());
    out.print(param);
    Read the response from server:
    java.io.BufferedReader in = new java.io.BufferedReader(new java.io.InputStreamReader(connection.getInputStream()));
    while((input = in.readLine()) != null)
    response += input + "\r";
    System.out.println("Client : received : "+response);
    Following is the response I receive from server:
    Client : received : <html><h1>Error processing XML request</h1>java.lang.IllegalArgumentException: No xml request posted</html>
    Has anybody know what the problem is? Why this error is issued?
    Any help is greatly appreciated.

    Dear legosa,
    Thanks so much for the replies. What you wrote makes absolute sence, w/o flush() or close(), it seems that I'm sending only balnk to output!
    I don't know how can I fix the 500 Internal Server Error; below is my complete code that does this part, can you tell me if you see sth. wrong in this code?
    param = java.net.URLEncoder.encode(aTrans.xmlDoc, "UTF-8");
    url = new URL("https://xml.test.surepay.com");
    connection = (HttpURLConnection)url.openConnection();                    
    connection.setDoInput(true);
    connection.setDoOutput(true);
    connection.setUseCaches(false);
    connection.setRequestMethod("POST");
    connection.setRequestProperty("Content-type", "application/x-www-form-urlencoded");
    String sLen = "" + param.length();
    connection.setRequestProperty("Content-length", sLen);
    connection.setRequestProperty("Accept", "text/plain");
    connection.connect();
    System.out.println("Client : Connected");
    java.io.PrintWriter out = new java.io.PrintWriter(connection.getOutputStream());
    System.out.println("Client : Writing Content");
    out.print(param);
    out.close();
    System.out.println(connection.getURL());          
    System.out.println(connection.getResponseCode() + " " + connection.getResponseMessage());
    System.out.println(connection.getURL());
    System.out.println("Client : Waiting for response from Server");
    java.io.BufferedReader in = new java.io.BufferedReader(new java.io.InputStreamReader(connection.getInputStream()));
    System.out.println("Client : Opened input stream");
    while((input = in.readLine()) != null)
    response += input + "\r";
    System.out.println("Client : received : "+response);

  • Flex 4.5 - java.lang.IllegalArgumentException: argument type mismatch

    0 down vote favorite
    I am having a problem when sending a soap request from a flex  4.5 application to a coldfusion 9 web service created using a CFC.
    The  most annoying thing it is only an intermittent problem but I can't work  out what is wrong.
    There a many methods within the web service of which Flex has no  issue, but these are mainly ones that read data.  The one I am having a  problem with is one that is writing back to the web service.
    The issue only arises when I have to restart the Coldfusion service  for some reason, which is quite often as the development machine is my  laptop.  It has now also happened when I have moved the Flex app to a  development server for testing and as it's hosted I can't restart the  services easily.
    I get the response below every time.  I have tried tracing the call  through the Flash Builder Network monitor and building a dummy call  using the same data, all to no avail.
    I have tried stripping out all of the code and then rebuilding it,  which takes a long time as I am using custom types in ColdFusion.
    Also , if I cfinvoke the method through a CFM page, it works fine. It  is only when trying to call it through a SOAP request through Flex 4.5.
    It will then suddenly start working again however and then it is fine  until I restart the CF services again.
    I can't tell what I triggers it  to start working again.
    Does something initialise it in ColdFusion and then it's fine ???.  I am  really struggling with this and any help would be appreciated.
    I have a  sample SOAP request that I trapped in the Network Monitor and also the  WSDL if needed.
    java.lang.IllegalArgumentException: argument type mismatch
        <ns1:stackTrace xmlns:ns1="http://xml.apache.org/axis/"
        xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">java.lang.IllegalArgumentException: argument type mismatch
    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:597)
    at org.apache.axis.utils.BeanPropertyDescriptor.set(BeanPropertyDescriptor.java:142)
    at org.apache.axis.encoding.ser.BeanPropertyTarget.set(BeanPropertyTarget.java:75)
    at org.apache.axis.encoding.DeserializerImpl.valueComplete(DeserializerImpl.java:249)
    at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:509)
    at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
    at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:171)
    at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
    at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
    at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
    at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:148)
    at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
    at coldfusion.xml.rpc.CFCProvider.invoke(CFCProvider.java:54)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
    at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
    at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
    at coldfusion.xml.rpc.CFCServlet.doAxisPost(CFCServlet.java:270)
    at coldfusion.filter.AxisFilter.invoke(AxisFilter.java:43)
    at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:356)
    at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
    at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
    at coldfusion.filter.PathFilter.invoke(PathFilter.java:87)
    at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
    at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
    at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
    at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
    at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
    at coldfusion.xml.rpc.CFCServlet.invoke(CFCServlet.java:138)
    at coldfusion.xml.rpc.CFCServlet.doPost(CFCServlet.java:289)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
    at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
    at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
    at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
    at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
    at jrun.servlet.FilterChain.service(FilterChain.java:101)
    at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
    at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
    at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
    at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
    at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
    at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
    at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)</ns1:stackTrace>
    <ns2:hostname xmlns:ns2="http://xml.apache.org/axis/" xmlns:soapenv
    ="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org2001/XMLSchema-instance">Darren-LT</ns2:hostname>

    Someone suggested it could be a serialisation issue but I I'm not sure how to go about checking that.
    Any suggestions ?

  • Java.lang.IllegalArgumentException: PDFDocumentRuntimeException: Interactive Form Operation Failed (DC Migrated from 7.0 to 7.4)

    Hi Experts,
    We have migrated one of our portal systems from 7.0 to 7.4. There is one application which uses Adobe Interactive Forms. The same DC when we tested on Development environment works fine as expected. The same thing when deployed to QA system, I am getting the below error:
    java.lang.IllegalArgumentException: can't parse argument number urn:AdobeDocumentServicesWsd/AdobeDocumentServicesVi/document
        at java.text.MessageFormat.makeFormat(MessageFormat.java:1339)
        at java.text.MessageFormat.applyPattern(MessageFormat.java:458)
        at java.text.MessageFormat.<init>(MessageFormat.java:350)
        at java.text.MessageFormat.format(MessageFormat.java:811)
        at com.sap.tc.adobe.pdfobject.base.core.PDFObjectRuntimeException$DummyLocalizableTextFormatter.<init>(PDFObjectRuntimeException.java:43)
        ... 98 more
    See full exception chain for details.
    //Full Exception chain
    Detailed Exception Chain
    com.sap.tc.adobe.pdfdocument.base.core.PDFDocumentRuntimeException: Interactive Form Operation Failed
      at com.sap.tc.webdynpro.clientserver.uielib.adobe.impl.InteractiveForm.afterHandleActionEvent(InteractiveForm.java:774)
      at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.afterApplicationModification(ClientApplication.java:1105)
      at com.sap.tc.webdynpro.clientserver.phases.RespondPhase.execute(RespondPhase.java:59)
      at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequestPartly(WindowPhaseModel.java:162)
      at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doProcessRequest(WindowPhaseModel.java:110)
      at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:97)
      at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:515)
      at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:58)
      at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.doExecute(ClientApplication.java:1671)
      at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.doProcessing(ClientApplication.java:1485)
      at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doApplicationProcessingEmbedded(ApplicationSession.java:919)
      at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doApplicationProcessing(ApplicationSession.java:878)
      at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:357)
      at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:326)
      at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.delegateToRequestManager(AbstractExecutionContextDispatcher.java:62)
      at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.DispatchHandlerForRequestManager.service(DispatchHandlerForRequestManager.java:39)
      at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.DispatchHandlerForRequestManager.service(DispatchHandlerForRequestManager.java:46)
      at com.sap.engine.services.servlets_jsp.server.deploy.impl.module.IRequestDispatcherImpl.dispatch(IRequestDispatcherImpl.java:292)
      at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.ExecutionContextDispatcher.dispatchToAppContext(ExecutionContextDispatcher.java:68)
      at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.dispatch(AbstractExecutionContextDispatcher.java:53)
      at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:245)
      at com.sap.tc.webdynpro.clientserver.embedding.JavaApplicationProxy$Runner.callRequestManager(JavaApplicationProxy.java:1244)
      at com.sap.tc.webdynpro.clientserver.embedding.JavaApplicationProxy$Runner.callEmbeddedApplication(JavaApplicationProxy.java:1122)
      at com.sap.tc.webdynpro.clientserver.embedding.JavaApplicationProxy$SendDataAndProcessActionCommand.doExecute(JavaApplicationProxy.java:1605)
      at com.sap.tc.webdynpro.clientserver.embedding.JavaApplicationProxy$AbstractCommand.execute(JavaApplicationProxy.java:1488)
      at com.sap.tc.webdynpro.clientserver.embedding.JavaApplicationProxy$Runner.execute(JavaApplicationProxy.java:1028)
      at com.sap.tc.webdynpro.clientserver.embedding.JavaApplicationProxy.execute(JavaApplicationProxy.java:859)
      at com.sap.tc.webdynpro.clientserver.embedding.JavaApplicationProxy.sendDataAndProcessAction(JavaApplicationProxy.java:468)
      at com.sap.tc.webdynpro.portal.pb.impl.JavaApplicationProxyAdapter.sendDataAndProcessAction(JavaApplicationProxyAdapter.java:191)
      at com.sap.portal.pb.PageBuilder.updateApplications(PageBuilder.java:1698)
      at com.sap.portal.pb.PageBuilder.SendDataAndProcessAction(PageBuilder.java:369)
      at com.sap.portal.pb.PageBuilder$PhaseListenerImpl.doPhase(PageBuilder.java:2123)
      at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processPhaseListener(WindowPhaseModel.java:251)
      at com.sap.tc.webdynpro.clientserver.phases.PortalDispatchPhase.execute(PortalDispatchPhase.java:50)
      at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequestPartly(WindowPhaseModel.java:162)
      at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doProcessRequest(WindowPhaseModel.java:110)
      at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:97)
      at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:515)
      at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:58)
      at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.doExecute(ClientApplication.java:1671)
      at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.doProcessing(ClientApplication.java:1485)
      at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doApplicationProcessingStandalone(ApplicationSession.java:908)
      at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doApplicationProcessing(ApplicationSession.java:880)
      at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:357)
      at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:326)
      at com.sap.tc.webdynpro.serverimpl.core.AbstractDispatcherServlet.doContent(AbstractDispatcherServlet.java:87)
      at com.sap.tc.webdynpro.serverimpl.wdc.DispatcherServlet.doContent(DispatcherServlet.java:101)
      at com.sap.tc.webdynpro.serverimpl.core.AbstractDispatcherServlet.doPost(AbstractDispatcherServlet.java:62)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
      at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:152)
      at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:38)
      at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:466)
      at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:210)
      at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:441)
      at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:430)
      at com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:38)
      at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
      at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:81)
      at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
      at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:278)
      at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
      at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:81)
      at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
      at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
      at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
      at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
      at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
      at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
      at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
      at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
      at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
      at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
      at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
      at com.sap.engine.services.httpserver.filters.SessionSizeFilter.process(SessionSizeFilter.java:26)
      at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
      at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
      at com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:57)
      at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
      at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
      at com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:43)
      at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
      at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
      at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:475)
      at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:269)
      at com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:56)
      at com.sap.engine.core.thread.execution.Executable.run(Executable.java:122)
      at com.sap.engine.core.thread.execution.Executable.run(Executable.java:101)
      at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:328)
    Caused by: com.sap.tc.adobe.pdfdocument.base.core.PDFDocumentRuntimeException: PDFDocument Processor failed to process RenderRequest Due to the following Reason
    can't parse argument number urn:AdobeDocumentServicesWsd/AdobeDocumentServicesVi/document
      at com.sap.tc.adobe.pdfdocument.base.core.PDFDocumentProcessor.process(PDFDocumentProcessor.java:55)
      at com.sap.tc.adobe.pdfdocument.base.core.PDFDocumentInteractiveFormHandlingContext.execute(PDFDocumentInteractiveFormHandlingContext.java:110)
      at com.sap.tc.adobe.pdfdocument.base.core.PDFDocumentInteractiveFormHandlingContext.execute(PDFDocumentInteractiveFormHandlingContext.java:135)
      at com.sap.tc.webdynpro.clientserver.uielib.adobe.impl.AdobeFormHelper.createPdf(AdobeFormHelper.java:689)
      at com.sap.tc.webdynpro.clientserver.uielib.adobe.impl.InteractiveForm.afterHandleActionEvent(InteractiveForm.java:641)
      ... 88 more
    Caused by: java.lang.IllegalArgumentException: can't parse argument number urn:AdobeDocumentServicesWsd/AdobeDocumentServicesVi/document
      at java.text.MessageFormat.makeFormat(MessageFormat.java:1339)
      at java.text.MessageFormat.applyPattern(MessageFormat.java:458)
      at java.text.MessageFormat.<init>(MessageFormat.java:350)
      at java.text.MessageFormat.format(MessageFormat.java:811)
      at com.sap.tc.adobe.pdfobject.base.core.PDFObjectRuntimeException$DummyLocalizableTextFormatter.<init>(PDFObjectRuntimeException.java:43)
      at com.sap.tc.adobe.pdfobject.base.core.PDFObjectRuntimeException.<init>(PDFObjectRuntimeException.java:26)
      at com.sap.tc.adobe.pdfobject.base.core.PDFObjectDII.invoke(PDFObjectDII.java:393)
      at com.sap.tc.adobe.pdfobject.base.core.PDFObjectDII.doSoapCall(PDFObjectDII.java:91)
      at com.sap.tc.adobe.pdfobject.base.core.PDFObject.execute(PDFObject.java:111)
      at com.sap.tc.adobe.pdfdocument.base.core.PDFDocumentRenderHandler.handle(PDFDocumentRenderHandler.java:176)
      at com.sap.tc.adobe.pdfdocument.base.core.PDFDocumentProcessor.process(PDFDocumentProcessor.java:52)
      ... 92 more
    I dont know how to proceed further. I checked the ADS connection which is fine. Reader Rights is also fine.How I will debug this error further?

    Hello,
    This may caused by:
    1, ReaderRights
    2, Destination ConfigPort_Document
    It seems you have already confirmed point 1, so please check point 2.
    Also check SAP note 1443819 part "Check the configuration", if the service is not working, you have to config the service according to SAP note 1443819.
    Regards,
    David

  • Java.lang.IllegalArgumentException: References to entities are not allowed

    Hi,
    I am using Berkely DB(native edition) 5.0.21 version. I have a couple classes as defined below:
    Class - 1:
    package bdb.test;
    import java.util.List;
    import com.sleepycat.persist.model.Entity;
    import com.sleepycat.persist.model.PrimaryKey;
    @Entity
    public class Employee {
         @PrimaryKey
         private String id ;
         private String name;
         private List<Employee> reportingManagers ;
         public String getId() {
              return id;
         public void setId(String id) {
              this.id = id;
         public String getName() {
              return name;
         public void setName(String name) {
              this.name = name;
         public List<Employee> getReportingManagers() {
              return reportingManagers;
         public void setReportingManagers(List<Employee> managers) {
              this.reportingManagers = managers;
    Class - 2 :
    package bdb.test;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.util.ArrayList;
    import java.util.List;
    import com.sleepycat.db.DatabaseException;
    import com.sleepycat.db.Environment;
    import com.sleepycat.db.EnvironmentConfig;
    import com.sleepycat.persist.EntityStore;
    import com.sleepycat.persist.PrimaryIndex;
    import com.sleepycat.persist.StoreConfig;
         public class BDBTest{
              public static void main(String agrs[]){
                   Environment myEnv;
                   EntityStore store;
                   try {
                        EnvironmentConfig myEnvConfig = new EnvironmentConfig();
                        myEnvConfig.setCacheSize(30000);
                        StoreConfig storeConfig = new StoreConfig();
                        myEnvConfig.setAllowCreate(true);
                        myEnvConfig.setInitializeCache(true);
                        storeConfig.setAllowCreate(true);
                        try {
                        // Open the environment and entity store
                        myEnv = new Environment(new File("c:\\BDBTEST\\"), myEnvConfig);
                        store = new EntityStore(myEnv, "MyStore", storeConfig);
                        PrimaryIndex<String, Employee> primaryIndex = store.getPrimaryIndex(String.class, Employee.class);
                        // write Employee
                        Employee employee = buildEmployee("E1", "EMP1");
                        primaryIndex.putNoReturn(employee);
                   } catch (FileNotFoundException fnfe) {
                        System.err.println(fnfe.toString());
                        System.exit(-1);
                   } catch(DatabaseException dbe) {
                        System.err.println("Error opening environment and store: " +
                        dbe.toString());
                        System.exit(-1);
              public static Employee buildEmployee(String id,String name){
                   Employee employee = new Employee();
                   employee.setId(id);
                   employee.setName(name);
                   employee.setManagers(buildManager());
                   return employee;
              public static List<Employee> buildManager(){
                   List <Employee> managers = new ArrayList<Employee>();
                   Employee manager1 = new Employee();
                   manager1.setId("M111");
                   manager1.setName("Manager1");
                   Employee manager2 = new Employee();
                   manager2.setId("M222");
                   manager2.setName("Manager2");
                   managers.add(manager2);
                   return managers;
    While running the Class 2, I am getting the following exception :
    Exception in thread "main" java.lang.IllegalArgumentException: References to entities are not allowed: bdb.test.Employee
         at com.sleepycat.persist.impl.RecordOutput.writeObject(RecordOutput.java:94)
         at com.sleepycat.persist.impl.ObjectArrayFormat.writeObject(ObjectArrayFormat.java:137)
         at com.sleepycat.persist.impl.RecordOutput.writeObject(RecordOutput.java:114)
         at com.sleepycat.persist.impl.ReflectionAccessor$ObjectAccess.write(ReflectionAccessor.java:398)
         at com.sleepycat.persist.impl.ReflectionAccessor.writeNonKeyFields(ReflectionAccessor.java:258)
         at com.sleepycat.persist.impl.ReflectionAccessor.writeNonKeyFields(ReflectionAccessor.java:255)
         at com.sleepycat.persist.impl.ComplexFormat.writeObject(ComplexFormat.java:528)
         at com.sleepycat.persist.impl.ProxiedFormat.writeObject(ProxiedFormat.java:116)
         at com.sleepycat.persist.impl.RecordOutput.writeObject(RecordOutput.java:114)
         at com.sleepycat.persist.impl.ReflectionAccessor$ObjectAccess.write(ReflectionAccessor.java:398)
         at com.sleepycat.persist.impl.ReflectionAccessor.writeNonKeyFields(ReflectionAccessor.java:258)
         at com.sleepycat.persist.impl.ComplexFormat.writeObject(ComplexFormat.java:528)
         at com.sleepycat.persist.impl.PersistEntityBinding.writeEntity(PersistEntityBinding.java:103)
         at com.sleepycat.persist.impl.PersistEntityBinding.objectToData(PersistEntityBinding.java:83)
         at com.sleepycat.persist.PrimaryIndex.putNoOverwrite(PrimaryIndex.java:474)
         at com.sleepycat.persist.PrimaryIndex.putNoOverwrite(PrimaryIndex.java:449)
         at bdb.test.BDBTest.main(BDBTest.java:42)
    Question : In the above example reportingManagers is also a list of Employee classes. Can't I self reference a object with in the same object ? How do I store list of reportingManagers in this example? Any help is highly appreciated.
    Thanks,
    Bibhu

    Hi Sandra,
    Thanks for the reply.
    Is there any restrictions in Berkeley DB to store cyclic referencing objects?
    API documentation for Entity annotation talks about cyclic references in one of section but contradicts the same in another section. Please refer the link below:
    [ http://download.oracle.com/docs/cd/E17076_02/html/java/com/sleepycat/persist/model/Entity.html]
    Following sections of this documentation contradicts each other. I have highlighted both of them in bold.
    Other Type Restrictions:
    Entity classes and subclasses may not be used in field declarations for persistent types. Fields of entity classes and subclasses must be simple types or non-entity persistent types (annotated with Persistent not with Entity).
    If a field of an Entity needs to reference an object, the referenced object should be marked with @Persistent and not with @Entity. So, self referencing is not possible as the main class would have been marked with @Entity.
    Embedded Objects
    As stated above, the embedded (or member) non-transient non-static fields of an entity class are themselves persistent and are stored along with their parent entity object. This allows embedded objects to be stored in an entity to an arbitrary depth.
    There is no arbitrary limit to the nesting depth of embedded objects within an entity; however, there is a practical limit. When an entity is marshalled, each level of nesting is implemented internally via recursive method calls. If the nesting depth is large enough, a StackOverflowError can occur. In practice, this has been observed with a nesting depth of 12,000, using the default Java stack size. This restriction on the nesting depth of embedded objects does not apply to cyclic references, since these are handled specially as described below.
    Self referencing is possible.
    Object Graphs
    When an entity instance is stored, the graph of objects referenced via its fields is stored and retrieved as a graph. In other words, if a single instance is referenced by two or more fields when the entity is stored, the same will be true when the entity is retrieved. When a reference to a particular object is stored as a member field inside that object or one of its embedded objects, this is called a cyclic reference. Because multiple references to a single object are stored as such, cycles are also represented correctly and do not cause infinite recursion or infinite processing loops. If an entity containing a cyclic reference is stored, the cyclic reference will be present when the entity is retrieved.
    My question:
    In the above first highlighted section says to store a referenced/embedded object it needs be marked with @Persistent and not with @Entity annotation. That rules out storage of cyclic referencing object since the main object would have been already marked with @Entity annotation. The second section indicates having support for cyclic references.
    So, Is it possible to store cyclic referencing objects in BDB? if yes, how it should be done?
    Thanks,
    Bibhu
    Edited by: user12848956 on Jan 20, 2011 7:19 AM

  • Java.lang.IllegalArgumentException: MONTH Error

    I am maintaining an very old website built with ColdFusion 7 in my org, but I am very new to ColdFusion. We have a newsbriefs module which worked very well before last week. However, from last week, it started throwing me an error when I try to search the articles (Please see below for the error messages). Can anybody tell me what's wrong? Is it something wrong with the java environment on the server or something wrong with the code? How should I fix this problem? Everything else works fine on this site except for the searching articles by date or keywords. Any advices or suggestions would be greatly appreciated!!!
    Resources:   
    Check the ColdFusion documentation to verify that you are using the correct syntax.
    Search the Knowledge Base to find a solution to your problem.
    Browser 
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ;
    InfoPath.1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C)
    Remote Address 
    192.198.46.55
    Referrer 
    http://siteroot/sitename/newsbriefs/CF/viewbydate.cfm
    Date/Time 
    14-Dec-11 09:54 AM
    Stack Trace (click to expand)
    at cfviewbydate_action2ecfm1313219662.runPage(E:\InetPub\wwwroot\sitename\newsbriefs\CF\view bydate_action.cfm:49) 
    java.lang.IllegalArgumentException: MONTH
    at java.util.GregorianCalendar.computeTime(GregorianCalendar.java:2482) 
    at java.util.Calendar.updateTime(Calendar.java:2463) 
    at java.util.Calendar.getTimeInMillis(Calendar.java:1082) 
    at java.util.Calendar.getTime(Calendar.java:1055) 
    at coldfusion.runtime.CFPage.CreateDate(CFPage.java:937) 
    at cfviewbydate_action2ecfm1313219662.runPage(E:\InetPub\wwwroot\sitename\newsbriefs\CF\viewbydate_action.cfm:49) 
    at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:192) 
    at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:366) 
    at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) 
    at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:279) 
    at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) 
    at coldfusion.filter.PathFilter.invoke(PathFilter.java:86) 
    at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) 
    at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:74) 
    at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) 
    at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) 
    at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) 
    at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) 
    at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) 
    at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:126) 
    at coldfusion.CfmServlet.service(CfmServlet.java:175) 
    at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) 
    at jrun.servlet.FilterChain.doFilter(FilterChain.java:86) 
    at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) 
    at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) 
    at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) 
    at jrun.servlet.FilterChain.service(FilterChain.java:101) 
    at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) 
    at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) 
    at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:284) 
    at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) 
    at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203) 
    at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320) 
    at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
      at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266) 
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) 

    Thanks very much for you quick response! Here are some codes related to this action:
    Page viewbydate.cfm (no problem on this page, but on the following page):
    <cfoutput>
    <cfinclude template="menu.cfm">
    <cfif isdefined('news_title')>
    <cfupdate datasource="newsbriefs" tablename="news">
    The article titled #news_title# has been updated in the database.<br />
    </cfif>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>View By Date</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body>
    <form name="form" method="post" action="viewbydate_action.cfm">
    <cfif isdefined('makeissue') and #makeissue# eq true>
    <cfquery datasource="newsbriefs" name="ii">
    SELECT TOP 1 ISSUE.ISSUE_ID, finalize
    FROM ISSUE
    ORDER BY ISSUE.ISSUE_ID DESC;
    </cfquery>
    <cfif #ii.finalize# eq false>
    <cfset form.issue_id = #ii.issue_id#>
    <cfelse>
    <cfset form.issue_id = #ii.issue_id#+1>
    </cfif>
    Create Issue: Step 1<input type="hidden" name="issue_id" value="#form.issue_id#"></cfif>
      <table border="0">
        <tr>
          <td colspan="3"><div align="right">Select stories by </div></td>
          <td colspan="3"><select name="criteria">
              <option value="added">date added</option>
              <option value="story">story date</option>
                </select></td>
        </tr>
    <cfset current = now()>
    <cfset twoweeks = current-14>
        <tr>
          <td colspan="6"> </td>
        </tr>
        <tr>
          <td>Month</td>
          <td>
    <select name="frommonth">
    <cfloop from="0" to="11" step="1" index="add">
    <option value="#dateformat(dateadd('m', add, twoweeks), 'm')#">
    #dateformat(dateadd('m', add, twoweeks), 'mmmm')#</option>
    </cfloop>
    </select>
       </td>
          <td>Day</td>
          <td>
       <select name="fromday">
    <cfloop from="1" to="31" step="1" index="add">
    <option value="#add#" <cfif #dateformat(twoweeks, 'd')# eq #add#>selected</cfif>>#add#</option>
    </cfloop>
    </select>
    </td>
          <td>Year</td>
          <td>
       <select name="fromyear">
    <cfloop from="-1" to="1" step="1" index="add">
    <option value="#dateformat(dateadd('yyyy', add, twoweeks), 'yyyy')#"
    <cfif #dateformat(dateadd('yyyy', add, twoweeks), 'yyyy')# eq #dateformat(twoweeks, 'yyyy')#>selected</cfif>>
    #dateformat(dateadd('yyyy', add, twoweeks), 'yyyy')#</option>
    </cfloop>
    </select>
    </td>
        </tr>
        <tr>
          <td> </td>
          <td> </td>
          <td> </td>
          <td> </td>
          <td> </td>
          <td> </td>
        </tr>
        <tr>
          <td>Month</td>
          <td><select name="tomonth">
    <cfloop from="0" to="11" step="1" index="add">
    <option value="#dateformat(dateadd('m', add, current), 'm')#">
    #dateformat(dateadd('m', add, current), 'mmmm')#</option>
    </cfloop>
    </select>
    </td>
          <td>Day</td>
          <td>   <select name="today">
    <cfloop from="1" to="31" step="1" index="add">
    <option value="#add#" <cfif #dateformat(current, 'd')# eq #add#>selected</cfif>>#add#</option>
    </cfloop>
    </select>
    </td>
          <td>Year</td>
          <td>   <select name="toyear">
    <cfloop from="-1" to="1" step="1" index="add">
    <option value="#dateformat(dateadd('yyyy', add, current), 'yyyy')#"
    <cfif #dateformat(dateadd('yyyy', add, current), 'yyyy')# eq #dateformat(current, 'yyyy')#>selected</cfif>>
    #dateformat(dateadd('yyyy', add, current), 'yyyy')#</option>
    </cfloop>
    </select>
    </td>
        </tr>
        <tr>
          <td colspan="6"><input type="submit" value="Get Articles"></td>
        </tr>
      </table>
    </form>
    </body>
    </html>
    </cfoutput>
    Here is the viewbydateaction.cfm (error message returned on this page):
    <cfoutput>
    <!--- CREATE DATES FOR THE FROM AND TO DATES ON SUBMIT PAGE --->
    <cfif isdefined('form.fromyear')>
    <cfset fromdate = #createdatetime(form.fromyear,form.frommonth,form.fromday,0,0,0)#>
    <cfset todate = #createdatetime(form.toyear,form.tomonth,form.today,23,59,59)#>
    </cfif>
    <!--- GET ALL STORIES --->
    <cfquery name="z" datasource="newsbriefs" cachedwithin="#createtimespan(0,0,15,0)#">
    select *
    from news
    </cfquery>
    <cfquery  datasource="newsbriefs" name="y">
    select distinct news_category
    from news
    order by news_category
    </cfquery>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>View Articles</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body>
    <cfinclude template="menu.cfm">
    <form name="form" method="post" action="preview.cfm">
    <cfif isdefined('form.issue_id') and #form.issue_id# neq "">Create Issue: Step 2<input type="hidden" name="issue_id" value="#form.issue_id#"><cfset makeissue = true></cfif>
    <table border="1">
    <cfloop query="y">
    <cfquery datasource="newsbriefs" name="a">
    select *
    from category
    where category_id = #y.news_category#
    </cfquery>
    <tr><td colspan="2"><h1>#a.category_name#</h1></td></tr>
    <cfquery datasource="newsbriefs" name="x">
    select *
    from news
    where news_category = #y.news_category#
    order by news_category,news_year desc,news_month desc,news_day desc
    </cfquery>
    <cfquery datasource="newsbriefs" name="ii">
    SELECT TOP 1 ISSUE.ISSUE_ID, finalize
    FROM ISSUE
    ORDER BY ISSUE.ISSUE_ID DESC;
    </cfquery>
    <cfloop query="x">
    <cfset storydate = '#dateformat(createdate(x.news_year,x.news_month,x.news_day), 'd mmmm yyyy')#'>
    <cfif #form.criteria# eq 'story'>
    <cfif #storydate# gte #fromdate# and #storydate# lte #todate#>
    #x.news_title#<br>
    #storydate#
    <br>
    <br></cfif>
    <cfelse>
    <cfif #x.added# gte #fromdate# and #x.added# lte #todate#>
    <tr><td rowspan="4" width="20">
    <cfif isdefined('makeissue') and #makeissue# eq true><input type="checkbox" name="storyid" value="#x.news_id#">Add
    <cfif #ii.finalize# eq false>to temp issue</cfif></cfif><br>
    <br>
    <cfquery datasource="newsbriefs" name="b">
    select *
    from news_issue
    where news_id = #x.news_id#
    </cfquery>
    <cfif isdefined('b.issue_id') and #b.issue_id# neq "">
    <cfloop query="b">
    issue #b.issue_id#<Br>
    </cfloop><cfelse> </cfif>
    </td><td><a href="editarticle.cfm?news_id=#x.news_id#">#x.news_title#</a></td></tr>
    <tr><td>#storydate#</td></tr>
      <tr><td>#news_text#</td></tr>
        <tr><td>#news_source#</td></tr>
    </cfif>
    </cfif>
    </cfloop>
    <tr><td colspan="2"> </td></tr>
    </cfloop>
    </table>
    <input type="submit" value="NEXT >>">
    </form>
    </body>
    </html>
    </cfoutput>

  • When i use oracle vwp give this error (java.lang.IllegalArgumentException:

    sir i use oracle with vwp
    sir see my code this code goto catch (Exception e) section and give this code in textfield
    " java.lang.IllegalArgumentException: luser.username "
    when i use mysql that give right result but when use oracel that give me this error
    try {
    RowKey userRowKey = luserDataProvider.findFirst
    (new String[] { "luser.username" },
    new Object[] { textField4.getText()});
    if (userRowKey == null) {
    textField3.setText("11111");
    return null;
    } else {
    textField3.setText("22222");
    return null;
    catch (Exception e) {
    log("Cannot perform login for userid " + textField3.getText(), e);
    error("Cannot perform login for userid " + textField3.getText() + ": " + e);
    textField3.setText(e);
    return null;
    please give me idea how i get right result
    thank you

    please check Article-ID "Positions Hierarchy Edittor Shows Error Your Userarea Applet Has Caused A Runtime Exception [ID 1151488.1]" in MOS...
    HTH

  • [   Error]:  java.lang.IllegalArgumentException: Parameter 'configFolder'

    Hi,
    I am importing a track of ESS 603, MSS 600 and PCUI_GP 603 in NWDI using template build and I am getting the below error:
    --cpid sap.com_SAPPCUI_GP_1 --dcvendor sap.com --dcname pcui_gp/isr/cfg --bvar default --trace ALL --root E:\usr\sap\NWP\JC01\j2ee\cluster\server0\temp\CBS\1\.B\25 --filepath E:\usr\sap\NWP\JC01\j2ee\cluster\server0\temp\CBS\1\.B\25 --logfile E:\usr\sap\NWP\JC01\j2ee\cluster\server0\temp\CBS\1\.B\25\DCs\sap.com\pcui_gp\isr\cfg\_comp\gen\default\logs\cbs-build.log --buildnumber 25 --buildprop JDK1.3.1_HOME=C:\j2sdk1.4.2_24-x64; --actwsisn 2
    Aug 25, 2010 3:33:43 PM  ...wd, String vfsdir, boolean localOnly) [   Debug]:  root: E:\usr\sap\NWP\JC01\j2ee\cluster\server0\temp\CBS\1\.B\25, usr: <null>, pwd: *****, vfsdir: <null>, localOnly: true dontUseCBS: true
    Aug 25, 2010 3:33:43 PM  ...getDevelopmentConfigurationInstance() [   Debug]:  rootFolder: E:\usr\sap\NWP\JC01\j2ee\cluster\server0\temp\CBS\1\.B\25, vfsRootFolder: <null>, isLocalOnlyMode: true, userName: <null>
    Aug 25, 2010 3:33:43 PM  ...tc.buildcontroller.CBSBuildController [   Error]:  java.lang.IllegalArgumentException: Parameter 'configFolder' must be an existing folder.
         at com.tssap.dtr.client.lib.vfs.config.impl.Configuration._initConfigFolder(Configuration.java:281)
         at com.tssap.dtr.client.lib.vfs.config.impl.Configuration.<init>(Configuration.java:182)
         at com.tssap.dtr.client.lib.vfs.config.Configuration.getConfiguration(Configuration.java:45)
         at com.tssap.dtr.client.lib.vfs.config.Configuration.getConfiguration(Configuration.java:37)
         at com.sap.tc.devconf.impl.ConfigUtils.getConfiguration(ConfigUtils.java:337)
         at com.sap.tc.devconf.DevelopmentConfigurationFactory.getConfiguration(DevelopmentConfigurationFactory.java:1588)
         at com.sap.tc.devconf.DevelopmentConfigurationFactory._getDevelopmentConfigurationInstance(DevelopmentConfigurationFactory.java:436)
         at com.sap.tc.devconf.DevelopmentConfigurationFactory.getDevelopmentConfigurationInstance(DevelopmentConfigurationFactory.java:1906)
         at com.sap.tc.buildcontroller.CBSBuildController.getConfiguration(CBSBuildController.java:708)
         at com.sap.tc.buildcontroller.CBSBuildController.execCommand(CBSBuildController.java:515)
         at com.sap.tc.buildcontroller.CBSBuildController.evalCmdLine(CBSBuildController.java:452)
         at com.sap.tc.buildcontroller.CBSBuildController.run(CBSBuildController.java:324)
         at com.sap.tc.buildcontroller.CBSBuildController.exec(CBSBuildController.java:262)
         at com.sap.tc.buildcontroller.CBSBuildController.mainLoop(CBSBuildController.java:217)
         at com.sap.tc.buildcontroller.CBSBuildController.main(CBSBuildController.java:178)
    Thank you.
    Regards
    Narsimha
    Edited by: Narsimha Kantipudi on Aug 28, 2010 2:32 AM

    Dear Narsimha,
      Error]: java.lang.IllegalArgumentException: Parameter 'configFolder' must be an existing folder.
    please proceed as per the note:
    #1438770   --  All DC builds fail with an IllegalStateException
    I also send you a link which guides you how to adjust the parameter BUILD_TOOL_VM_ARGS
    http://help.sap.com/saphelp_nw70/helpdata/en/53/75b3407e73c57fe10000000a1550b0/frameset.htm
    Best Regards,
    Ervin
    Edited by: Ervin Szolke on Aug 31, 2010 2:23 PM

  • Invoking web service from EJB3 throw java.lang.IllegalArgumentException

    I used JAX-WS to develop a web service and deployed it on webloigc 10.3.5. The web service was invoked from web application and it worked fine. However, when I tried to invoke the web service from a stateless session bean, java.lang.IllegalArgumentException was thrown out and complained that "*interface gov.fema.web.nimcast.service.client.UpdateEmailPortType is not visible from class loader*". I tried following three ways to solve the problem
    1. put the web service client artifacts under APP-INF/classes of the EAR
    2. bundle the web service client artifacts into a jar file and put it under APP-INF/lib of the EAR
    3. put the web service client artifacts into the same jar file of the EJB
    However, none of the above approaches worked out, every time same exception thrown out.
    I used following commands in my ant script to generate the web service client artifacts
    <path id="deploypathref">
    <fileset dir="${wl.server}">
    <include name="server/lib/weblogic.jar"/>
    <include name="server/lib/weblogic_sp.jar"/>
    <include name="server/lib/xqrl.jar"/>
    <include name="server/lib/webservices.jar"/>
    <include name="../modules/features/weblogic.server.modules_10.3.3.0.jar"/>
    </fileset>
    </path>
    <taskdef name="clientgen"
    classname="weblogic.wsee.tools.anttasks.ClientGenTask" >
         <classpath refid="deploypathref"/>
    </taskdef>
    <clientgen
                   wsdl="http://${wls.hostname}:${wls.port}/nimscast/UpdateEmailService?WSDL"
                   destDir="${path.service}/src"
                   packageName="gov.fema.web.nimcast.service.client"
                   type="JAXWS"/>
                   <javac
                   srcdir="${path.service}/src" destdir="${path.assembly}/ear/APP-INF/classes"
                   includes="**/*.java"/>
    and following is the detail information from the stack trace:
    Caused By: java.lang.IllegalArgumentException: interface gov.fema.web.nimcast.service.client.UpdateEmailPortType is not visible from class loader
         at java.lang.reflect.Proxy.getProxyClass(Proxy.java:353)
         at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581)
         at weblogic.wsee.jaxws.spi.ClientInstance.createProxyInstance(ClientInstance.java:143)
         at weblogic.wsee.jaxws.spi.WLSProvider$ServiceDelegate.getPort(WLSProvider.java:855)
         at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:344)
         at weblogic.wsee.jaxws.spi.WLSProvider$ServiceDelegate.getPort(WLSProvider.java:792)
         at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:326)
         at javax.xml.ws.Service.getPort(Service.java:92)
         at gov.fema.web.nimcast.service.client.UpdateEmailService.getUpdateEmailPortTypePort(Unknown Source)
         at gov.fema.prepcast.beans.UserManagement.updateUserEmailInNimscast(UserManagement.java:622)
         at gov.fema.prepcast.beans.UserManagement.changeUserProfileInfo(UserManagement.java:324)
         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:597)
         at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
         at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
         at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
         at $Proxy144.changeUserProfileInfo(Unknown Source)
         at gov.fema.prepcast.beans.UserManagement_dinn8k_UserManagementLocalImpl.__WL_invoke(Unknown Source)
         at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:39)
         at gov.fema.prepcast.beans.UserManagement_dinn8k_UserManagementLocalImpl.changeUserProfileInfo(Unknown Source)
         at gov.fema.prepcast.actions.secret.UpdateUserAction.saveProfileInfo(UpdateUserAction.java:287)
         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:597)
         at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:452)
         at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:291)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:254)
         at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)
         at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263)
         at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
         at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:133)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
         at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
         at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:142)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:166)
         at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:190)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
         at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:485)
         at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Edited by: 938276 on Jul 25, 2012 7:55 AM

    No you haven't, because
    Caused by: java.lang.NoClassDefFoundError: org.example.www.Sample_PortType a relevant class can still not be found and Java really is not going to lie to you; this class is not on your application's classpath so it is either missing or put in the wrong place. Note that missing classes can be caused by you forgetting to properly redeploying your application - its usually something silly like that. Figure out what you did wrong and correct your mistake.
    The fact that you have to mention that you "setup the classpath" is questionable; in web applications you don't touch the classpath at all. So what exactly did you do?

  • Java.lang.IllegalArgumentException for listener in web.xml with weblogic12.1.1

    Hi.
    Im trying to upgrade the weblogic version from 10 to 12 for my application.
    Im getting below mentioned error while deploying ear file in weblogic 12 which works fine with version10.
    " java.lang.IllegalArgumentException:[HTTP:101164] User defined class com.ab.util.session object is not a listener as it doesnt implement the correct interface."
    Deployment is getting failed because of this error.
    If i comment out listener, deployment is success.

    HI Timo,
    Old Weblogic version: 10.3.3
    New weblogic version:12.1.1
    Using Struts frame work.
    SessionObject class:
    public class SessionObject implements HttpSessionBindingListener{
    public void valueBound( HttpSessionBindingEvent  event)
    public voind valueUnbound (HttpSessionBindingEvent  event)
    web.xml:
    <listener>
    <listener-class>com.ab.util.SessionObject</listener-class>
    <listener>
    I want to know that why im getting  " java.lang.IllegalArgumentException:[HTTP:101164] User defined class com.ab.util.session object is not a listener as it doesnt implement the correct interface"  error while deploying the ear file under version 12.1.1 when it is working fine with version 10.3.3.
    Should i make any changes in web.xml or should i include any jars???

  • Mail Receiver Error:  java.lang.IllegalArgumentException: can't parse argum

    Hi everybody,
    I get the error in mail receiver CC:
    java.lang.IllegalArgumentException: can't parse argument number
    My Payload looks like this:
    <?xml version="1.0" encoding="utf-8" ?>
    - <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
      <Subject>The subject</Subject>
      <From>mailadress</From>
      <To>mailadress</To>
      <Content_Type>multipart/mixed; boundary="AaBb--984dfgeSSd3532"</Content_Type>
    - <Content_Description>
      <attachment filename="Filename.txt">content_of_attachment</attachment>
      </Content_Description>
      <Content_Disposition>attachment</Content_Disposition>
      <Content>Constant</Content>
      </ns1:Mail>
    Any ideas?
    Regards
    Mario

    Hi Mario..
    Go thru this thread for it.
    Error Catagory : XI_J2EE_ADAPTER_MAIL
    Regards

  • How to solve 'java/lang/OutOfMemoryError' when apply weblogic patch 10.3.6.0.10?

    Hi All:  Our platform is IBM AIX power system 64 bit, os level 6.  Oracle Fusion Middleware version is 10.3.6.0.8.  We tried to patch 10.3.6.0.10 on it, but encounter ‘out of memory error’ when  applied WebLogic patch 10.3.6.0.10 on UAT report server.  Currently UAT has 3GB memory (currently is 3G) .
    JVMDUMP006I Processing dump event "systhrow",
    detail "java/lang/OutOfMemoryError
    JVMDUMP032I JVM requested Heap dump using
    '/ora_bin01/u01/oracle/Middleware/utilhd' in response to an event
    JVMDUMP010I Heap dump written to
    /ora_bin01/u01/oracle/Middleware/utils/bsu/heapdump.20150224.152727.6422620.0001.phd
    JVMDUMP032I JVM requested Java dump using
    '/ora_bin01/u01/oracle/Middleware/utils/bsu/javacore.20150224.152727.6422620.0002.txt'
    in response to an event
    JVMDUMP010I Java dump written to
    /ora_bin01/u01/oracle/Middleware/utils/bsu/javacore.20150224.152727.6422620.0002.txt
    JVMDUMP032I JVM requested Snap dump using
    '/ora_bin01/u01/oracle/Middleware/utils/bsu/Snap.20150224.152727.6422620.0003.trc'
    in response to an event
    JVMDUMP006I Processing dump event "systhrow",
    detail "java/lang/OutOfMemoryError" - please wait.
    JVMDUMP010I Snap dump written to
    /ora_bin01/u01/oracle/Middleware/utils/bsu/Snap.20150224.152727.6422620.0003.trc
    JVMDUMP013I Processed dump event "systhrow",
    detail "java/lang/OutOfMemoryError".
    JVMDUMP032I JVM requested Heap dump using
    '/ora_bin01/u01/oracle/Middleware/utils/bsu/heapdump.20150224.152735.6422620.0004.phd'
    in response to an event
    JVMDUMP010I Heap dump written to
    /ora_bin01/u01/oracle/Middleware/utils/bsu/heapdump.20150224.152735.6422620.0004.phd
    JVMDUMP032I JVM requested Java dump using
    '/ora_bin01/u01/oracle/Middleware/utils/bsu/javacore.20150224.152735.6422620.0005.txt'
    in response to an event
    JVMDUMP010I Java dump written to
    /ora_bin01/u01/oracle/Middleware/utils/bsu/javacore.20150224.152735.6422620.0005.txt
    JVMDUMP032I JVM requested Snap dump using
    '/ora_bin01/u01/oracle/Middleware/utils/bsu/Snap.20150224.152735.6422620.0006.trc'
    in response to an event
    Exception in thread "main"
    java.lang.OutOfMemoryError at
    java.lang.StringBuffer.ensureCapacityImpl(StringBuffer.java:335)
    at
    java.lang.StringBuffer.append(StringBuffer.java:201)
    at
    java.lang.Class.throwNoSuchMethodException(Class.java:278)
    at
    java.lang.Class.getMethod(Class.java:845)
    at
    com.bea.cie.common.dao.xbean.XBeanDataHandler.isValueSet(XBeanDataHandler.java:958)
    at
    com.bea.cie.common.dao.xbean.XBeanDataHandler.getValueFromObject(XBeanDataHandler.java:589)
    at
    com.bea.cie.common.dao.xbean.XBeanDataHandler.getSimpleValue(XBeanDataHandler.java:431)
    at
    com.bea.plateng.patch.dao.cat.PatchDependency.getRule(PatchDependency.java:48)
    at
    com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getInvalidatedPatchMap(PatchCatalogHelper.java:1625)
    at com.bea.plateng.patch.PatchSystem.updatePatchCatalog(PatchSystem.java:436)
    at
    com.bea.plateng.patch.PatchSystem.refresh(PatchSystem.java:130)
    at
    com.bea.plateng.patch.PatchSystem.setCacheDir(PatchSystem.java:201)
    at
    com.bea.plateng.patch.Patch.main(Patch.java:281)
    JVMDUMP010I Snap dump written to
    /ora_bin01/u01/oracle/Middleware/utils/bsu/Snap.20150224.152735.6422620.0006.trc
    JVMDUMP013I Processed dump event "systhrow",
    detail "java/lang/OutOfMemoryError".
    Exception in thread "Attach API wait loop"
    java.lang.OutOfMemoryError
       at
    com.ibm.tools.attach.javaSE.CommonDirectory.waitSemaphore(CommonDirectory.java:222)
    at
    com.ibm.tools.attach.javaSE.AttachHandler$WaitLoop.waitForNotification(AttachHandler.java:329)
    at com.ibm.tools.attach.javaSE.AttachHandler$WaitLoop.run(AttachHandler.java:396)
    bsu.sh -install -patch_download_dir=/ora_bin01/u01/oracle/Middleware/utils/bsu/cache_dir -patchlist=12UV -prod_dir=/ora_bin01/u01/oracle/Middleware/wlserver_10.3
    we followed the README.txt instructions, and stop/start weblogic service before/after apply patch. Can anyone suggest a solution or Doc ID for helping us?
    thank you very much!

    Solutions: Bounce the applications and check the arguments if you can increase it.  It is due to memory issue
    You can set these values in CommEnv.sh (.cmd for windows) file located in the weblogic_home/common/bin directory.
    This gets applied to all the domains under that wls home.
    If you want to make the changes to specific domain then edit the SetDomainEnv.sh file located under the domain/bin directory.
    How to solve java.lang.OutOfMemoryError: Java heap space
    solutions:  export JVM_ARGS="-Xms1024m -Xmx1024m"
    How to solve java.lang.OutOfMemoryError: PermGen space
    solution : export JVM_ARGS="-XX:PermSize=64M -XX:MaxPermSize=256m"

Maybe you are looking for