class java

search for more blogs here

 

"Extended a class, getting a class cast error" posted by ~Ray
Posted on 2008-03-12 23:06:53

Why does this occur? Surely since MyThirdPartyClass is a child of ThirdPartyClass anything that expects a ThirdPartyClass shouldn't have any problem right? Or do I have that backwards? And if so is there anything I can do to fix the problem?Thanks!Sam warnerja wrote:That is not talking about a ThirdPartyClass. It is talking about an anonymous inner (nested) class of ThirdPartyClass. Hmmm. I had noticed that. So is it caused by my extended class or not?The schedule works without my extension (though doesn't do what I be it to) and with the extension I get the class direct exception. If my class isn't involved in the error what's going on? warnerja wrote:That is not talking about a ThirdPartyClass. It is talking about an anonymous inner (nested) class of ThirdPartyClass. Hmmm. I had noticed that. So is it caused by my extended class or not? The schedule works without my extension (though doesn't do what I want it to) and with the extension I get the class cast exception. If my class isn't involved in the error what's going on? When you extend a class that class is still around so to speak. I can create by mental act for example that your class is instantiated and then causes the superclass (ThirdPartyClass) to execute its constructor and that creates an anonymous inner class and does something with it say enter it to be used somewhere else. But because the superclass wasn't really designed to be subclassed it created the nested object in an incorrect express and that's causing the error when it's eventually used. This is all speculation of cover. But the point is that it's not like your subclass completely supplants the superclass and that it's some kind of either/or instruct between your class being used and the superclass having an error. paulcw wrote: I can imagine for example that your class is instantiated and then causes the superclass (ThirdPartyClass) to kill its constructor and that creates an anonymous inner class and does something with it say enter it to be used somewhere else. But because the superclass wasn't really designed to be subclassed it created the nested object in an incorrect express and that's causing the error when it's eventually used. This is all speculation of course. But the inform is that it's not like your subclass completely supplants the superclass and that it's some kind of either/or condition between your class being used and the superclass having an error. Hmmm... I guess what's confusing to me is that I barely touched the third part class. I simply overwrote one method. Specifically the ThirdPartyClass itself was an extension of a JApplet. Since I wanted to use it directly in my label. I couldn't set the applet's parameters so I overwrote the getParameters(String) method to go strings of my choosing. So not even the constructor was affected. It should essentially be using the old ThirdPartyClass except when it called getParameters it should use my code instead of the original. And the original getParameters method doesn't affect the state of the class in any way it just returns a string. I guess what you said is change by reversal and I guess there isn't much I can do about it but it still seems a little odd. Thanks,Sam AutoConverter runVisitor() failed: CREATE-SUN expected 2 inputs a be and a command block (optional) java lang. NullPointerExceptionat org thirdparty displace. OptionDialog show(OptionDialog java:36)at org thirdparty window. GUIWorkspace$11 handleError(GUIWorkspace java:1125)at org thirdparty compiler. AutoConverter convert(AutoConverter java:161)at org thirdparty window. ProceduresLite handleLoadSectionEvent(ProceduresLite java:44)at org thirdparty event. LoadSectionEvent beHandledBy(LoadSectionEvent java:38)at org thirdparty event. Event doRaise(Event java:215) .... Specifically the ThirdPartyClass itself was an extension of a JApplet. Since I wanted to use it directly in my code. I couldn't set the applet's parameters so I overwrote the getParameters(arrange) method to return strings of my choosing. Your approach makes little sense to me. Applets go a well-defined lifecycle. If you wanted to embed the applet into your own application all you undergo to do is use the applet following its lifecycle (that is represent it set the context invoke init and start and forbid and undo). Overriding anything should not be necessary. I mentioned the constructor just as an example. It could have been anything. One problem with OOP-teaching is that they over-emphasize inheritance and give the impression that anything can be trivially subclassed. It's not adjust. My money's on getCodeBase being the problem. However as mentioned above I'd rethink your whole approach. It's not clear to me why you'd need to override getParameter since if you're embedding this into your code you'd be the one calling getParameter anyway. Not for me. If I happened to recognize what that code in the stack trace was it might help. I don't and you're not making it easier by removing information. However even if you hadn't scrubbed the actual class names with "org thirdparty" I probably still wouldn't recognize it. It just underlines my suspicion that your changes allowed the label to get into an incorrect state that caused the exception later on. Specifically the ThirdPartyClass itself was an extension of a JApplet. Since I wanted to use it directly in my code. I couldn't set the applet's parameters so I overwrote the getParameters(String) method to go strings of my choosing. Your approach makes little comprehend to me. Applets follow a well-defined lifecycle. If you wanted to embed the applet into your own application all you have to do is use the applet following its lifecycle (that is instantiate it set the context invoke init and start and stop and undo). Overriding anything should not be necessary. That's exactly what I want to do. However the applet requires one parameter to be set (DefaultModel = some url) -- if this isn't set I can't run the applet. As far as I can express (and I have an as-yet unanswered question in the Applets forum asking about this) there is no way to set the parameters in an Applet in any way besides putting in in the 'param' tag in the Applet code in the HTML. If I'm wrong about that gratify let me know. On the assumption that I was alter. I decided to increase the getParameters(String) method so that it would return the desired String when asked. Naturally to do this. I had to extend the entire class. This solved the problem of the schedule failing when it asked for the parameter but then it failed when it checked the codebase. I overrode the getCodeBase() method and the applet no longer had a problem there. Then I got the exceptions I got above. I'm fairly certain (but naturally not 100% certain of anything) that neither of my methods should have affected the inner-workings of LiteApplet -- I was overriding methods that were from Applet (and not overridden in LiteApplet. I checked) that are just supposed to pass back strings -- the same Strings that would be passed back if it were embedded in a web summon -- and not affect the applet in any way. Naturally. I'm wrong about one or more of my assumptions above but I just can't work out how overriding those two methods could have created the error that I'm getting. Sam PS: Here is the entire exception if you evaluate it could back up. I was scrubbing it merely so as not to confuse matters and make my posts overly desire. The last exception below gets repeated indefinitely. AutoConverter runVisitor() failed: CREATE-SUN expected 2 inputs a number and a command block (optional) java lang. NullPointerExceptionat org nlogo displace. OptionDialog show(OptionDialog java:36)at org nlogo window. GUIWorkspace$11 handleError(GUIWorkspace java:1125)at org nlogo compiler. AutoConverter convert(AutoConverter java:161)at org nlogo window. ProceduresLite handleLoadSectionEvent(ProceduresLite java:44)at org nlogo event. LoadSectionEvent beHandledBy(LoadSectionEvent java:38)at org nlogo event. Event doRaise(Event java:215)at org nlogo event. Event raise(Event java:116)at org nlogo window. ModelLoader loadHelper(ModelLoader java:76)at org nlogo window. ModelLoader fill(ModelLoader java:45)at org nlogo window. LiteApplet go(LiteApplet java:128)at org nlogo window. LiteApplet$1 run(LiteApplet java:26)at java awt event. InvocationEvent send(InvocationEvent java:209)at java awt. EventQueue dispatchEvent(EventQueue java:461)at java awt. EventDispatchThread pumpOneEventForHierarchy(EventDispatchThread java:269)at java awt. EventDispatchThread pumpEventsForHierarchy(EventDispatchThread java:190)at java awt. EventDispatchThread pumpEvents(EventDispatchThread java:184)at java awt. EventDispatchThread pumpEvents(EventDispatchThread java:176)at java awt. EventDispatchThread run(EventDispatchThread java:110)java lang. ClassCastException: org nlogo window. CompilerManagerat org nlogo event. Event findTop(Event java:279)at org nlogo event. Event doRaise(Event java:190)at org nlogo event. Event increase(Event java:116)at org nlogo window. CompilerManager compileAll(CompilerManager java:68)at org nlogo window. CompilerManager handleLoadEndEvent(CompilerManager java:61)at org nlogo event. LoadEndEvent beHandledBy(LoadEndEvent java:11)at org nlogo event. Event doRaise(Event java:215)at org nlogo event. Event raise(Event java:116)at org nlogo window. ModelLoader loadHelper(ModelLoader java:115)at org nlogo window. ModelLoader load(ModelLoader java:45)at org nlogo window. LiteApplet go(LiteApplet java:128)at org nlogo window. LiteApplet$1 run(LiteApplet java:26)at java awt event. InvocationEvent send(InvocationEvent java:209)at java awt. EventQueue dispatchEvent(EventQueue java:461)at java awt. EventDispatchThread pumpOneEventForHierarchy(EventDispatchThread java:269)at java awt. EventDispatchThread pumpEventsForHierarchy(EventDispatchThread java:190)at java awt. EventDispatchThread pumpEvents(EventDispatchThread java:184)at java awt. EventDispatchThread pumpEvents(EventDispatchThread java:176)at java awt. EventDispatchThread run(EventDispatchThread java:110)java lang. ClassCastException: org nlogo window. LiteApplet$2at org nlogo event. Event findTop(Event java:279)at org nlogo event. Event doRaise(Event java:190)at org nlogo event. Event raise(Event java:116)at org nlogo window. GUIWorkspace$6 run(GUIWorkspace java:660)at org nlogo window. ThreadUtils$2 run(ThreadUtils java:37)at org nlogo window. ThreadUtils$4 run(ThreadUtils java:86)at java awt event. InvocationEvent dispatch(InvocationEvent java:209)at java awt. EventQueue dispatchEvent(EventQueue java:461)at java awt. EventDispatchThread pumpOneEventForHierarchy(EventDispatchThread java:269)at java awt. EventDispatchThread pumpEventsForHierarchy(EventDispatchThread java:190)at java awt. EventDispatchThread pumpEvents(EventDispatchThread java:184)at java awt. EventDispatchThread pumpEvents(EventDispatchThread java:176)at java awt. EventDispatchThread run(EventDispatchThread java:110) warnerja wrote:What paul is saying is somewhere in your applet's code you are invoking getParameter. The Applet class itself does not invoke that method so you don't need to override it. Just whereever you invoke it do your custom logic instead of simply invoking getParameter. warnerja wrote:What paul is saying is somewhere in your applet's code you are invoking getParameter. The Applet class itself does not create that method so you don't be to override it. Just whereever you invoke it do your custom logic instead of simply invoking getParameter. WE'RE NOT ASKING YOU TO!What we're saying is that you don't undergo to subclass or dress that applet at all!If you don't understand this then ask us a specific question about what you don't get. Otherwise forbid trying write this program or programming anything.

Forex Groups - Tips on Trading

Related article:
http://forum.java.sun.com/thread.jspa?threadID=5236638

comments | Add comment | Report as Spam


"Extended a class, getting a class cast error" posted by ~Ray
Posted on 2008-03-12 23:06:52

Why does this become? Surely since MyThirdPartyClass is a child of ThirdPartyClass anything that expects a ThirdPartyClass shouldn't have any problem right? Or do I have that backwards? And if so is there anything I can do to fix the problem?Thanks!Sam warnerja wrote:That is not talking about a ThirdPartyClass. It is talking about an anonymous inner (nested) class of ThirdPartyClass. Hmmm. I had noticed that. So is it caused by my extended class or not?The program works without my extension (though doesn't do what I want it to) and with the extension I get the class cast exception. If my class isn't involved in the error what's going on? warnerja wrote:That is not talking about a ThirdPartyClass. It is talking about an anonymous inner (nested) class of ThirdPartyClass. Hmmm. I had noticed that. So is it caused by my extended class or not? The program works without my extension (though doesn't do what I want it to) and with the extension I get the class direct exception. If my class isn't involved in the error what's going on? When you increase a class that class is still around so to communicate. I can imagine for example that your class is instantiated and then causes the superclass (ThirdPartyClass) to execute its constructor and that creates an anonymous inner class and does something with it say register it to be used somewhere else. But because the superclass wasn't really designed to be subclassed it created the nested object in an incorrect express and that's causing the error when it's eventually used. This is all speculation of cover. But the inform is that it's not desire your subclass completely supplants the superclass and that it's some kind of either/or condition between your class being used and the superclass having an error. paulcw wrote: I can imagine for example that your class is instantiated and then causes the superclass (ThirdPartyClass) to execute its constructor and that creates an anonymous inner class and does something with it say register it to be used somewhere else. But because the superclass wasn't really designed to be subclassed it created the nested object in an incorrect express and that's causing the error when it's eventually used. This is all speculation of cover. But the point is that it's not like your subclass completely supplants the superclass and that it's some kind of either/or condition between your class being used and the superclass having an error. Hmmm... I guess what's confusing to me is that I barely touched the third move class. I simply overwrote one method. Specifically the ThirdPartyClass itself was an extension of a JApplet. Since I wanted to use it directly in my code. I couldn't set the applet's parameters so I overwrote the getParameters(arrange) method to go strings of my choosing. So not even the constructor was affected. It should essentially be using the old ThirdPartyClass except when it called getParameters it should use my code instead of the original. And the original getParameters method doesn't affect the state of the class in any way it just returns a string. I anticipate what you said is change by reversal and I anticipate there isn't much I can do about it but it still seems a little odd. Thanks,Sam AutoConverter runVisitor() failed: CREATE-SUN expected 2 inputs a be and a command block (optional) java lang. NullPointerExceptionat org thirdparty swing. OptionDialog show(OptionDialog java:36)at org thirdparty window. GUIWorkspace$11 handleError(GUIWorkspace java:1125)at org thirdparty compiler. AutoConverter convert(AutoConverter java:161)at org thirdparty window. ProceduresLite handleLoadSectionEvent(ProceduresLite java:44)at org thirdparty event. LoadSectionEvent beHandledBy(LoadSectionEvent java:38)at org thirdparty event. Event doRaise(Event java:215) .... Specifically the ThirdPartyClass itself was an extension of a JApplet. Since I wanted to use it directly in my label. I couldn't set the applet's parameters so I overwrote the getParameters(String) method to return strings of my choosing. Your come makes little comprehend to me. Applets go a well-defined lifecycle. If you wanted to embed the applet into your own application all you have to do is use the applet following its lifecycle (that is instantiate it set the context invoke init and go away and stop and undo). Overriding anything should not be necessary. I mentioned the constructor just as an example. It could have been anything. One problem with OOP-teaching is that they over-emphasize inheritance and give the impression that anything can be trivially subclassed. It's not true. My money's on getCodeBase being the problem. However as mentioned above I'd rethink your whole approach. It's not clear to me why you'd need to decree getParameter since if you're embedding this into your code you'd be the one calling getParameter anyway. Not for me. If I happened to recognize what that code in the stack trace was it might help. I don't and you're not making it easier by removing information. However change surface if you hadn't scrubbed the actual class names with "org thirdparty" I probably comfort wouldn't accept it. It just underlines my suspicion that your changes allowed the label to get into an incorrect state that caused the exception later on. Specifically the ThirdPartyClass itself was an extension of a JApplet. Since I wanted to use it directly in my code. I couldn't set the applet's parameters so I overwrote the getParameters(String) method to return strings of my choosing. Your approach makes little sense to me. Applets follow a well-defined lifecycle. If you wanted to enter the applet into your own application all you have to do is use the applet following its lifecycle (that is instantiate it set the context invoke init and start and stop and undo). Overriding anything should not be necessary. That's exactly what I want to do. However the applet requires one parameter to be set (DefaultModel = some url) -- if this isn't set I can't run the applet. As far as I can tell (and I undergo an as-yet unanswered question in the Applets forum asking about this) there is no way to set the parameters in an Applet in any way besides putting in in the 'param' tag in the Applet label in the HTML. If I'm wrong about that gratify let me experience. On the assumption that I was alter. I decided to extend the getParameters(String) method so that it would return the desired arrange when asked. Naturally to do this. I had to extend the entire class. This solved the problem of the program failing when it asked for the parameter but then it failed when it checked the codebase. I overrode the getCodeBase() method and the applet no longer had a problem there. Then I got the exceptions I got above. I'm fairly certain (but naturally not 100% certain of anything) that neither of my methods should have affected the inner-workings of LiteApplet -- I was overriding methods that were from Applet (and not overridden in LiteApplet. I checked) that are just supposed to go back strings -- the same Strings that would be passed approve if it were embedded in a web page -- and not affect the applet in any way. Naturally. I'm wrong about one or more of my assumptions above but I just can't work out how overriding those two methods could have created the error that I'm getting. Sam PS: Here is the entire exception if you think it could back up. I was scrubbing it merely so as not to misidentify matters and make my posts overly long. The last exception below gets repeated indefinitely. AutoConverter runVisitor() failed: CREATE-SUN expected 2 inputs a number and a command block (optional) java lang. NullPointerExceptionat org nlogo swing. OptionDialog show(OptionDialog java:36)at org nlogo window. GUIWorkspace$11 handleError(GUIWorkspace java:1125)at org nlogo compiler. AutoConverter alter(AutoConverter java:161)at org nlogo window. ProceduresLite handleLoadSectionEvent(ProceduresLite java:44)at org nlogo event. LoadSectionEvent beHandledBy(LoadSectionEvent java:38)at org nlogo event. Event doRaise(Event java:215)at org nlogo event. Event raise(Event java:116)at org nlogo window. ModelLoader loadHelper(ModelLoader java:76)at org nlogo window. ModelLoader load(ModelLoader java:45)at org nlogo window. LiteApplet go(LiteApplet java:128)at org nlogo window. LiteApplet$1 run(LiteApplet java:26)at java awt event. InvocationEvent send(InvocationEvent java:209)at java awt. EventQueue dispatchEvent(EventQueue java:461)at java awt. EventDispatchThread pumpOneEventForHierarchy(EventDispatchThread java:269)at java awt. EventDispatchThread pumpEventsForHierarchy(EventDispatchThread java:190)at java awt. EventDispatchThread pumpEvents(EventDispatchThread java:184)at java awt. EventDispatchThread pumpEvents(EventDispatchThread java:176)at java awt. EventDispatchThread run(EventDispatchThread java:110)java lang. ClassCastException: org nlogo window. CompilerManagerat org nlogo event. Event findTop(Event java:279)at org nlogo event. Event doRaise(Event java:190)at org nlogo event. Event raise(Event java:116)at org nlogo window. CompilerManager compileAll(CompilerManager java:68)at org nlogo window. CompilerManager handleLoadEndEvent(CompilerManager java:61)at org nlogo event. LoadEndEvent beHandledBy(LoadEndEvent java:11)at org nlogo event. Event doRaise(Event java:215)at org nlogo event. Event raise(Event java:116)at org nlogo window. ModelLoader loadHelper(ModelLoader java:115)at org nlogo window. ModelLoader fill(ModelLoader java:45)at org nlogo window. LiteApplet go(LiteApplet java:128)at org nlogo window. LiteApplet$1 run(LiteApplet java:26)at java awt event. InvocationEvent send(InvocationEvent java:209)at java awt. EventQueue dispatchEvent(EventQueue java:461)at java awt. EventDispatchThread pumpOneEventForHierarchy(EventDispatchThread java:269)at java awt. EventDispatchThread pumpEventsForHierarchy(EventDispatchThread java:190)at java awt. EventDispatchThread pumpEvents(EventDispatchThread java:184)at java awt. EventDispatchThread pumpEvents(EventDispatchThread java:176)at java awt. EventDispatchThread run(EventDispatchThread java:110)java lang. ClassCastException: org nlogo window. LiteApplet$2at org nlogo event. Event findTop(Event java:279)at org nlogo event. Event doRaise(Event java:190)at org nlogo event. Event increase(Event java:116)at org nlogo window. GUIWorkspace$6 run(GUIWorkspace java:660)at org nlogo window. ThreadUtils$2 run(ThreadUtils java:37)at org nlogo window. ThreadUtils$4 run(ThreadUtils java:86)at java awt event. InvocationEvent send(InvocationEvent java:209)at java awt. EventQueue dispatchEvent(EventQueue java:461)at java awt. EventDispatchThread pumpOneEventForHierarchy(EventDispatchThread java:269)at java awt. EventDispatchThread pumpEventsForHierarchy(EventDispatchThread java:190)at java awt. EventDispatchThread pumpEvents(EventDispatchThread java:184)at java awt. EventDispatchThread pumpEvents(EventDispatchThread java:176)at java awt. EventDispatchThread run(EventDispatchThread java:110) warnerja wrote:What paul is saying is somewhere in your applet's code you are invoking getParameter. The Applet class itself does not invoke that method so you don't be to override it. Just whereever you create it do your custom logic instead of simply invoking getParameter. warnerja wrote:What paul is saying is somewhere in your applet's code you are invoking getParameter. The Applet class itself does not create that method so you don't need to decree it. Just whereever you create it do your custom logic instead of simply invoking getParameter. WE'RE NOT ASKING YOU TO!What we're saying is that you don't undergo to subclass or change that applet at all!If you don't understand this then ask us a specific challenge about what you don't get. Otherwise forbid trying create verbally this program or programming anything.

Forex Groups - Tips on Trading

Related article:
http://forum.java.sun.com/thread.jspa?threadID=5236638

comments | Add comment | Report as Spam


"HttpServlet" posted by ~Ray
Posted on 2008-01-01 21:12:26

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will: have the possibility to earn one of our surprises if you are an active member access many other special features that ordain be introduced later. Registration is abstain simple and absolutely free so please. ! If you have any problems with the registration affect or your account login gratify. Writing HttpServlet for web is easy. It is a simple class but you undergo to extend it from HttpServlet. Also you have to override doGet doPost or function method. public class MyServlet extends HttpServlet { public cancel doGet(HttpServletRequest communicate. HttpServletResponse response) throws ServletException. IOException {... }

Forex Groups - Tips on Trading

Related article:
http://www.java-forums.org/java-tips/3911-httpservlet.html

comments | Add comment | Report as Spam


"[jruby-scm] [jira] Commented: (JRUBY-1497) :undefined method for ..." posted by ~Ray
Posted on 2007-12-15 15:00:14

[ http://jira codehaus org/browse/JRUBY-1497?page=com atlassian jira plugin system issuetabpanels:comment-tabpanel#challenge_114110 ] Derek Townsend commented on JRUBY-1497:---------------------------------------Has anyone looked at this problem yet? Charles do you need an example of this problem.> :undefined method for Thread:class for compiled Jruby classes> -------------------------------------------------------------->> Key: JRUBY-1497> URL: http://jira codehaus org/browse/JRUBY-1497> communicate: JRuby> air Type: Bug> Components: Compiler> Affects Versions: JRuby 0.9.0. JRuby 0.9.1. JRuby 0.9.2. JRuby 0.9.8. JRuby 0.9.9. JRuby 1.0.0RC1. JRuby 1.0.0RC2. JRuby 1.0.0RC3. JRuby 1.0.0. JRuby 1.0.1> Environment: Linux Fedora 7 Jruby 1.01> Reporter: Derek Townsend>> when a jruby program that uses go exclusive is compiled to java it errors out saying undefined method for go:class. Is is getting confused and thinking the Thread class is the java go class instead of Ruby thread class.> Error: jruby -e "Thread exclusive = adjust"> -e:1:in `method_missing': undefined method `exclusive=' for Thread:Class (NoMethodError)> After talking with Charles he suggest that it is a problem with the precompiled version not finding the go library or an air with how fill path is getting set up for precompiled apps-- This message is automatically generated by JIRA.-If you think it was sent incorrectly contact one of the administrators: http://jira codehaus org/secure/Administrators jspa-For more information on JIRA see: http://www atlassian com/software/jira <hr/><p>To unsubscribe from this list gratify visit:</p><p> <a href="http://xircles codehaus org/manage_email">http://xircles codehaus org/bring home the bacon_email</a>

Forex Groups - Tips on Trading

Related article:
http://archive.codehaus.org/jruby/scm/26161575.1195269206108.JavaMail.haus-jira@codehaus01.managed.contegix.com

comments | Add comment | Report as Spam


"Function Lookup" posted by ~Ray
Posted on 2007-12-09 13:32:20

Okay so the scenario is that I have a class that includes a lot of methods that will do various things. The class is not in any way static. I have a method which ordain act a String as a parameter and should run the method that is named by that string. Is there any way of doing this using reflection and the related technologies instead of creating a desire decision chain? im a little confused because if you know enough to know aboutthe reflection api how do you not experience about class getMethod(arrange name. Class[] params)?(that was gratify btw)http://java sun com/j2se/1.4.2/docs/api/java/lang/Class htmlEdited by: TuringPest on Nov 16. 2007 10:53 PM Look into the Command pattern. You can act a collection of objects that qualify as a Command and then stick them in a java util. Map so you can retrieve them by label. No reflection needed and no "long decision chain" (by which I guess you mean a long series of if/else if... / else statements) needed. Shortly after posting. I started discussing this with a friend from my Computer Science class (the same friend who makes it possible for me to experience about reflection but not class getMethod) and ended up abandoning the reflection-type approach. I hadn't gotten as far as what Collection to use yet but a map definitely seems to be the logical choice. Thanks,AndrewPS:that friend is quite humorous at computer science competitions. We've freaked out judges because he wrote a schedule that instead of just printing hello world to alter sure our IDE was working printed out a new class to print hello world compiled it and reflected it. PS:that friend is quite humorous at computer science competitions. We've freaked out judges because he wrote a program that instead of just printing hello world to make sure our IDE was working printed out a new class to create hello world compiled it and reflected it. I've now hit a snag and I'll have to extend my description. I'm working on a Java MUD and I'm trying to add the feature of "shells" sets of commands that a user can find while moving around. For example there would be a shell that a user would use to explore the world they would switch to a different shell when they went into combat and there would be another bomb for when a user wanted to buy or sell with a shop. The cozen is that I be the shells to be instantiated as needed so when a user enters a obtain there is a new instance of the obtain bomb made that allows the user to act with the shop. If I'm using commands as objects they must be instantiated as come up but should I undergo a bomb instantiate all the commands it needs when it's started should I maintain some sort of global map or list of commands that the bomb ordain simply get references to?The first would be simple to implement but could prove in massive shifts and reallocations of memory which would probably be inefficient. The second however would be difficult to plan out. I could use the instanceof operator and a long decision chain to get whatever commands I want and just store them in a lost or I could just look them up by label... Actually an idea that just occured to me is that I could create an inheritance chain creating a command interface and having template classes for each bomb (ex. ShopCommand and CombatCommand) and then I could just keep a enumerate of commands and create a map of strings and command references with the ones that were an instanceof whatever template class... I drop can you change the arguments a function takes from what arguments it's defined as having in an interface? I may not undergo a Command interface if I can't... I'll do some research but I think this ordain bring home the bacon.

Forex Groups - Tips on Trading

Related article:
http://forum.java.sun.com/thread.jspa?threadID=5237554

comments | Add comment | Report as Spam


"Function Lookup" posted by ~Ray
Posted on 2007-12-09 13:32:20

authorise so the scenario is that I have a class that includes a lot of methods that will do various things. The class is not in any way static. I have a method which will take a String as a parameter and should run the method that is named by that arrange. Is there any way of doing this using reflection and the related technologies instead of creating a long decision chain? im a little confused because if you know enough to know aboutthe reflection api how do you not know about class getMethod(arrange name. Class[] params)?(that was gratify btw)http://java sun com/j2se/1.4.2/docs/api/java/lang/Class htmlEdited by: TuringPest on Nov 16. 2007 10:53 PM Look into the Command copy. You can act a collection of objects that qualify as a Command and then fasten them in a java util. Map so you can retrieve them by name. No reflection needed and no "long decision chain" (by which I anticipate you mean a long series of if/else if... / else statements) needed. Shortly after posting. I started discussing this with a friend from my Computer Science class (the same friend who makes it possible for me to know about reflection but not class getMethod) and ended up abandoning the reflection-type approach. I hadn't gotten as far as what Collection to use yet but a map definitely seems to be the logical choice. Thanks,AndrewPS:that friend is quite humorous at computer science competitions. We've freaked out judges because he wrote a schedule that instead of just printing hello world to alter sure our IDE was working printed out a new class to create hello world compiled it and reflected it. PS:that friend is quite humorous at computer science competitions. We've freaked out judges because he wrote a schedule that instead of just printing hello world to make sure our IDE was working printed out a new class to print hello world compiled it and reflected it. I've now hit a catch and I'll have to increase my description. I'm working on a Java MUD and I'm trying to add the feature of "shells" sets of commands that a user can access while moving around. For example there would be a shell that a user would use to explore the world they would change by reversal to a different shell when they went into combat and there would be another bomb for when a user wanted to buy or change with a obtain. The trick is that I want the shells to be instantiated as needed so when a user enters a shop there is a new dilate of the shop shell made that allows the user to interact with the shop. If I'm using commands as objects they must be instantiated as well but should I have a shell instantiate all the commands it needs when it's started should I maintain some choose of global map or list of commands that the shell will simply get references to?The first would be simple to apply but could prove in massive shifts and reallocations of memory which would probably be inefficient. The second however would be difficult to plot out. I could use the instanceof operator and a desire decision chain to get whatever commands I want and just store them in a lost or I could just look them up by label... Actually an idea that just occured to me is that I could create an inheritance chain creating a dominate interface and having template classes for each shell (ex. ShopCommand and CombatCommand) and then I could just keep a enumerate of commands and create a map of strings and command references with the ones that were an instanceof whatever template class... I forget can you change the arguments a function takes from what arguments it's defined as having in an interface? I may not have a dominate interface if I can't... I'll do some research but I think this ordain work.

Forex Groups - Tips on Trading

Related article:
http://forum.java.sun.com/thread.jspa?threadID=5237554

comments | Add comment | Report as Spam


"Function Lookup" posted by ~Ray
Posted on 2007-12-09 13:32:20

authorise so the scenario is that I undergo a class that includes a lot of methods that will do various things. The class is not in any way static. I have a method which ordain take a String as a parameter and should run the method that is named by that arrange. Is there any way of doing this using reflection and the related technologies instead of creating a long decision arrange? im a little confused because if you know enough to know aboutthe reflection api how do you not experience about class getMethod(String name. Class[] params)?(that was gratify btw)http://java sun com/j2se/1.4.2/docs/api/java/lang/categorise htmlEdited by: TuringPest on Nov 16. 2007 10:53 PM Look into the Command pattern. You can keep a collection of objects that qualify as a Command and then fasten them in a java util. Map so you can retrieve them by label. No reflection needed and no "desire decision chain" (by which I anticipate you mean a desire series of if/else if... / else statements) needed. Shortly after posting. I started discussing this with a friend from my Computer Science class (the same friend who makes it possible for me to know about reflection but not class getMethod) and ended up abandoning the reflection-type approach. I hadn't gotten as far as what Collection to use yet but a map definitely seems to be the logical choice. Thanks,AndrewPS:that friend is quite humorous at computer science competitions. We've freaked out judges because he wrote a program that instead of just printing hello world to make sure our IDE was working printed out a new class to print hello world compiled it and reflected it. PS:that friend is quite humorous at computer science competitions. We've freaked out judges because he wrote a program that instead of just printing hello world to alter sure our IDE was working printed out a new class to print hello world compiled it and reflected it. I've now hit a catch and I'll have to extend my description. I'm working on a Java MUD and I'm trying to add the feature of "shells" sets of commands that a user can find while moving around. For example there would be a bomb that a user would use to investigate the world they would change by reversal to a different shell when they went into combat and there would be another shell for when a user wanted to buy or sell with a obtain. The trick is that I want the shells to be instantiated as needed so when a user enters a obtain there is a new instance of the shop shell made that allows the user to act with the shop. If I'm using commands as objects they must be instantiated as come up but should I undergo a shell instantiate all the commands it needs when it's started should I maintain some choose of global map or list of commands that the shell will simply get references to?The first would be simple to implement but could prove in massive shifts and reallocations of memory which would probably be inefficient. The second however would be difficult to plan out. I could use the instanceof operator and a long decision chain to get whatever commands I want and just store them in a lost or I could just look them up by name... Actually an idea that just occured to me is that I could create an inheritance chain creating a dominate interface and having template classes for each shell (ex. ShopCommand and CombatCommand) and then I could just keep a enumerate of commands and create a map of strings and dominate references with the ones that were an instanceof whatever template class... I drop can you change the arguments a answer takes from what arguments it's defined as having in an interface? I may not undergo a Command interface if I can't... I'll do some research but I evaluate this ordain work.

Forex Groups - Tips on Trading

Related article:
http://forum.java.sun.com/thread.jspa?threadID=5237554

comments | Add comment | Report as Spam


"Putting The Android SDK In Perspective" posted by ~Ray
Posted on 2007-11-27 19:56:41

The technical details of Android the new Google mobile telecommunicate OS platform are now out. There are many articles on the Web discussing the new platform many of which be to get things horribly wrong. So. I thought I’d try to put some perspective on Android here… First the web browser. At the Android launch. Eric Schmidt suggested that the Android web browser would somehow be revolutionary. It’s not. It’s just the same mobile web browser that’s open in millions of mobiles based on Nokia’s S60 platform and on Apple iPhones. Some people have suggested that this means (although granted the rather ugly-looking and silly little “dock” is obviously inspired by Apple’s Mac OS X desktop - don’t be fooled by this though - beautiful graphics are possible with Android). No. It just means that explore wanted a mobile web browser for Android and there’s a pretty good Open Source one already out there. However it’s alter that the web browser is a bit of a red herring. The real story of Android is in the application SDK. explore realised years ago what Steve Jobs didn’t until a few weeks ago - mobile phones SDKs. It’s a Java SDK which is a great decision on explore’s part. That’s another big difference to Apple by the way - Steve Jobs totally missed the inform about Java on mobile phones (and maybe everywhere else too). So is the Android Java SDK anything new? The answer is yes - but not necessarily in the way that people think. I’ve seen people be impressed for example that it has a Location Based Services API and a 3-D graphics API. There’s nothing new in that. Java ME already has these kind of capabilities - see for example: JSR-179. The Location API; JSR-239. Java Binding for OpenGL ES; and JSR-184. Mobile 3D Graphics API. How well many of these features bring home the bacon are much more down to the mobile communicate providers and handset manufacturers than anything else. Google has a few challenges ahead of it to translate the technical capabilities of the platform into amazing devices that bring home the bacon well in the hands of consumers. the big news about the SDK? It’s this. Android has integrated its Java-like platform deeply into the telecommunicate. In other words it’s a native application platform for Android phones. No-one has done this before and it will accept new types of application to be developed (Google has set aside $10M to furnish away to developers to affect development of such software - I hope young entrepreneurs use this opportunity some great little companies could be started by following this path). It should be noted that Sun’s forthcoming mobile OS platform. JavaFX Mobile is based around almost exactly the same concept. There are however significant differences between JavaFX Mobile and Android. explore has chosen to go the despatch of effectively making their own version of Java by writing keys parts in a non-standard way. For example. Android has a totally non-standard user interface toolkit. What this means is that applications written for Android have no come about of running anywhere else. Contrast that with JavaFX Mobile which will run Java SE. Java ME and JavaFX Script. JavaFX Mobile phones will be able to run is not a Java platform VM but rather a VM of their own design that runs their own so-called “Dalvik” bytecode. That is with Android. Java is not compiled to Java bytecode. So it’s alter. The big competitor to Android is Sun’s JavaFX Mobile. Android has chosen to go a non-standard despatch; whereas Sun has chosen to implement a full standard desktop-class platform. Which is the exceed platform? The displease will be in the detail. I evaluate though it comes down to this. on mobile devices. JavaFX Mobile will be continue and shoulders above Android - there would be almost no competition. However if it doesn’t run so well e g because full desktop Java is too much of a stretch for mobile devices at the moment then Android could easily win. Details about JavaFX Mobile should appear early in 2008 (similar to the Android details we undergo now - SDK emulators prototype hardware etc). At that point we’ll really start to get a conclude for how well JavaFX Mobile is going to bring home the bacon. If the technical hurdles are not insurmountable. Sun is actually in pole position here - and I’d imagine that the announcement of Android would be spurring the Java FX Mobile team on to escalate their efforts… One inform to always keep in mind when we’re thinking about consumer applications like mobile phones they don’t really need elegant APIs or really slick and cool SDKs how the developers use these tools is irrelavent what counts in the consumer market is the final human user interface. A lot of open obtain developers always forget this it’s not an SDK that’ll sell phones it will be the final layer of the human interface - an area Apple is King and where all others attempt to follow. To create by mental act that the dock represents all of the user interface in Mac OS X would also seem to be ill-informed - most of us pro-users hardy use the dock. I never change surface comprehend it but act it small and minimised because I find it useful to know at a glance my open applications. Has Sun ever made a descent GUI? I’m just trying to think and can’t find any good examples. change state Office looks hideous. 3D Looking furnish looked advanced for Sun but when I tried it was reminded of a third-party Finder replacement they had for Mac OS X which made files appear in 3D and you could whirl them around and journey intresting for a few minutes if you never played Doom but practically useless… It’s adjust that it’s not the SDK that sells phones… but to build the compelling features with great human interfaces that change phones requires software developers to apply the software parts of these features. And to do that developers requires APIs. So the APIs are critically important. It’s true that historically. Apple has been a leader and innovate in human-device interaction. It’s equally true that historically much Sun software has had terrible user-interfaces. It’s a similar story with with Google software actually. Sun at least recognises that they have been historically weak in this area. Not sure if explore does. However. I evaluate Apple may undergo really dropped the ball with their iPhone business copy. We’ll need to see how sales ramp up over the coming quarters to experience if that view is right or not. If it is alter then Apple’s mobile business will not accelerate as fast as it could; and gives current mobile leaders like Nokia a come about to raise their games; and players with new OS platforms desire Sun and explore to play surprise up… It’s worth noting in that believe that both JavaFX Mobile and Android undergo pretty advanced user interface toolkits. With the right developers building out feature sets both platforms can have amazing user interfaces. Why do you think that Java as the basis for the Gphone is a big win in any way shape or create? It’s just another verbose static language with a huge corporate flavor. What people don’t realize in the industry is that Objective-C+Cocoa is a truly dynamic language (think Smalltalk) married to a very develop and very capable GUI. It’s truly Apple’s secret weapon for rapid and best-of-breed app development but it’s a completely change state.

Forex Groups - Tips on Trading

Related article:
http://www.psynixis.com/blog/2007/11/14/putting-the-android-sdk-in-perspective/

comments | Add comment | Report as Spam


"When to forget about constructors in JavaEE" posted by ~Ray
Posted on 2007-11-17 15:27:19

Sometimes I see people do some choose of validation inside the constructors of a JavaEE component class like EJB or servlet class. They do this mostly for testing or debugging intend but always surprised to see certain fields have not been injected. For example the following validation in the constructor ordain shows the SessionContext is null: @Stateless(mappedName="FooBean")public class FooBean implements FooRemote { @Resource private SessionContext sctx; //DO NOT DO THIS public FooBean() { System out println("Inside constructor. Injected SessionContext: " + sctx); if(sctx == null) { throw new IllegalStateException ("SessionContext not injected! Something is do by!!"); } } //business methods...} This is an application bug and nothing is do by with the application server. The right way to validate injection fields is the @PostConstruct method. In the @PostConstruct method all injections are guaranteed to have completed. @Stateless(mappedName="FooBean")public class FooBean implements FooRemote { @Resource private SessionContext sctx; @PostConstruct private void validate() { System out println("Inside @PostConstruct. Injected SessionContext: " + sctx); } //business methods...}

Forex Groups - Tips on Trading

Related article:
http://javahowto.blogspot.com/2007/11/when-to-forget-about-constructors-in.html

comments | Add comment | Report as Spam


"RE: Error with nested class" posted by ~Ray
Posted on 2007-11-09 17:13:10

Hi Armin,Here is the label of the class and inner class in question. Robpackage com netcase netspat recordSystem bo;merchandise com netcase bo. BaseObject;public class Country extends BaseObject {/* * Fields *//** * @ojb field jdbc-type="VARCHAR" length="254" */private arrange countryCode;/** * @ojb handle jdbc-type="VARCHAR" length="254" */private arrange name;/** * @ojb handle jdbc-type="INTEGER"conversion="org apache ojb negociate accesslayer conversions. Boolean2IntFieldConversion" */private Boolean directFiling;/** * @ojb field jdbc-type="VARCHAR" length="254"conversion="com netcase ojb conversions. Enum2VarcharFieldConversion" */private PCTMemberOptions pctMember;/** * @ojb handle jdbc-type="VARCHAR" length="254"conversion="com netcase ojb conversions. Enum2VarcharFieldConversion" */private EPMemberOptions epMember;/** * @ojb field jdbc-type="VARCHAR" length="254"conversion="com netcase ojb conversions. Enum2VarcharFieldConversion" */private EPTranslationOptions epTranslations;/** * @ojb handle jdbc-type="INTEGER"conversion="org apache ojb negociate accesslayer conversions. Boolean2IntFieldConversion" */private Boolean publicationOccurs;/** * @ojb field jdbc-type="INTEGER"conversion="org apache ojb negociate accesslayer conversions. Boolean2IntFieldConversion" */private Boolean searchOccurs;/** * @ojb field jdbc-type="INTEGER"conversion="org apache ojb broker accesslayer conversions. Boolean2IntFieldConversion" */private Boolean examinationOccurs;/** * @ojb handle jdbc-type="INTEGER"conversion="org apache ojb negociate accesslayer conversions. Boolean2IntFieldConversion" */private Boolean officialActionsOccur;/** * @ojb handle jdbc-type="INTEGER"conversion="org apache ojb negociate accesslayer conversions. Boolean2IntFieldConversion" */private Boolean grantOccurs;/** * @ojb handle jdbc-type="VARCHAR" length="254"conversion="com netcase ojb conversions. Enum2VarcharFieldConversion" */private RenewalsOptions renewals;/** * @ojb field jdbc-type="INTEGER" */private Integer patentTerm;/** * @ojb field jdbc-type="INTEGER" */private Integer basePages;/** * @ojb handle jdbc-type="INTEGER" */private Integer baseClaims;/* * References *//** * @ojb compose foreignkey="currencyId" */private Currency currency;/* * Nested *//** * @ojb nested * @ojb modify-nested name="id" * primarykey="" */private CountryDateSet publicationDates;/** * @ojb nested * @ojb modify-nested name="id" * primarykey="" */private CountryDateSet submitSearchRequestDates;/** * @ojb nested * @ojb modify-nested label="id" * primarykey="" */private CountryDateSet receiveSearchResultsDates;/** * @ojb nested * @ojb modify-nested label="id" * primarykey="" */private CountryDateSet requestExaminationDates;/** * @ojb nested * @ojb modify-nested label="id" * primarykey="" */private CountryDateSet captureAcceptanceDataDates;/** * @ojb nested * @ojb modify-nested name="id" * primarykey="" */private CountryDateSet receiveActualGrantDates;/** * @ojb nested * @ojb modify-nested name="id" * primarykey="" */private CountryDateSet officialActionsDates;/* * Constructors */public Country() {super();}public Country(int id) {super(id);}/** * @go the baseClaims */public Integer getBaseClaims() {go baseClaims;}/** * @param baseClaims the baseClaims to set */public cancel setBaseClaims(Integer baseClaims) {this baseClaims = baseClaims;}/** * @return the basePages */public int getBasePages() {return basePages;}/** * @param basePages the basePages to set */public void setBasePages(int basePages) {this basePages = basePages;}/** * @return the captureAcceptanceDataDates */public CountryDateSet getCaptureAcceptanceDataDates() {go captureAcceptanceDataDates;}/** * @param captureAcceptanceDataDates thecaptureAcceptanceDataDates to set */public cancel setCaptureAcceptanceDataDates(CountryDateSet captureAcceptanceDataDates) {this captureAcceptanceDataDates =captureAcceptanceDataDates;}/** * @go the countryCode */public String getCountryCode() {go countryCode;}/** * @param countryCode the countryCode to set */public cancel setCountryCode(String countryCode) {this countryCode = countryCode;}/** * @go the directFiling */public boolean isDirectFiling() {go directFiling;}/** * @param directFiling the directFiling to set */public void setDirectFiling(boolean directFiling) {this directFiling = directFiling;}/** * @return the epMember */public EPMemberOptions getEpMember() {go epMember;}/** * @param epMember the epMember to set */public void setEpMember(EPMemberOptions epMember) {this epMember = epMember;}/** * @return the epTranslations */public EPTranslationOptions getEpTranslations() {return epTranslations;}/** * @param epTranslations the epTranslations to set */public void setEpTranslations(EPTranslationOptionsepTranslations) {this epTranslations = epTranslations;}/** * @go the examinationOccurs */public boolean isExaminationOccurs() {return examinationOccurs;}/** * @param examinationOccurs the examinationOccurs to set */public cancel setExaminationOccurs(boolean examinationOccurs) {this examinationOccurs = examinationOccurs;}/** * @return the grantOccurs */public boolean isGrantOccurs() {return grantOccurs;}/** * @param grantOccurs the grantOccurs to set */public void setGrantOccurs(boolean grantOccurs) {this grantOccurs = grantOccurs;}/** * @go the name */public String getName() {go label;}/** * @param label the name to set */public void setName(String label) {this name = label;}/** * @go the currency */public Currency getCurrency() {return currency;}/** * @param currency the currency to set */public cancel setCurrency(Currency currency) {this currency = currency;}/** * @go the officialActionsDates */public CountryDateSet getOfficialActionsDates() {return officialActionsDates;}/** * @param officialActionsDates the officialActionsDates to set */public void setOfficialActionsDates(CountryDateSetofficialActionsDates) {this officialActionsDates = officialActionsDates;}/** * @go the officialActionsOccur */public boolean isOfficialActionsOccur() {go officialActionsOccur;}/** * @param officialActionsOccur the officialActionsOccur to set */public cancel setOfficialActionsOccur(booleanofficialActionsOccur) {this officialActionsOccur = officialActionsOccur;}/** * @return the patentTerm */public int getPatentTerm() {go patentTerm;}/** * @param patentTerm the patentTerm to set */public void setPatentTerm(int patentTerm) {this patentTerm = patentTerm;}/** * @return the pctMember */public PCTMemberOptions getPctMember() {return pctMember;}/** * @param pctMember the pctMember to set */public void setPctMember(PCTMemberOptions pctMember) {this pctMember = pctMember;}/** * @return the publicationDates */public CountryDateSet getPublicationDates() {return publicationDates;}/** * @param publicationDates the publicationDates to set */public cancel setPublicationDates(CountryDateSet publicationDates){this publicationDates = publicationDates;}/** * @return the publicationOccurs */public boolean isPublicationOccurs() {go publicationOccurs;}/** * @param publicationOccurs the publicationOccurs to set */public cancel setPublicationOccurs(boolean publicationOccurs) {this publicationOccurs = publicationOccurs;}/** * @return the receiveActualGrantDates */public CountryDateSet getReceiveActualGrantDates() {go receiveActualGrantDates;}/** * @param receiveActualGrantDates the receiveActualGrantDates toset */public void setReceiveActualGrantDates(CountryDateSetreceiveActualGrantDates) {this receiveActualGrantDates = receiveActualGrantDates;}/**.

Forex Groups - Tips on Trading

Related article:
http://mail-archives.apache.org/mod_mbox/db-ojb-user/200709.mbox/%3C000001c7f38f$cb0bf5a0$0600a8c0@zaphod%3E

comments | Add comment | Report as Spam


"Re: Error with nested class" posted by ~Ray
Posted on 2007-11-03 13:45:24

Hi Robert,could you please post the mapping and java obtain for class Country (I expect that this is the class which declares handle 'publicationDates'?) too regards,ArminRobert Giddings wrote:> Hi,> > Can anyone tell me why I get this runtime exception when using OJB as> the inner class is neither abstract nor an interface and has a no> parameter default constructor. The inner class does increase an consider> class but that doesn't be to be a problem.> > Thanks,> > Robert Giddings> > Caused by: org apache ojb negociate metadata. MetadataException: Can't> act nested> disapprove of type 'class> com netcase netspat recordSystem bo. Country$CountryDateSe> t' for handle 'publicationDates'> at> org apache ojb negociate metadata fieldaccess. PersistentFieldDirectImpl.> set(Unknown obtain)> at> org apache ojb broker accesslayer. RowReaderDefaultImpl buildOrRefresh> Object(Unknown obtain)> at> org apache ojb broker accesslayer. RowReaderDefaultImpl readObjectFrom> (Unknown Source)> at> org apache ojb broker accesslayer. RsIterator getObjectFromResultSet(U> nknown obtain)> at org apache ojb negociate accesslayer. RsIterator next(Unknown> Source)> at> org apache ojb broker core. QueryReferenceBroker getCollectionByQuery(> Unknown obtain)> at> org apache ojb negociate core. QueryReferenceBroker getCollectionByQuery(> Unknown Source)> at> org apache ojb broker core. QueryReferenceBroker getCollectionByQuery(> Unknown Source)> at> org apache ojb negociate core out. PersistenceBrokerImpl getCollectionByQuery> (Unknown Source)> at> org apache ojb broker core. DelegatingPersistenceBroker getCollectionB> yQuery(Unknown obtain)> at> org apache ojb negociate core. DelegatingPersistenceBroker getCollectionB> yQuery(Unknown Source)> at> com netcase database. DAOService getObjectsByType(DAOService java:41)> ... 21 more> Caused by: java lang. InstantiationException:> com netcase netspat recordSystem bo> . Country$CountryDateSet> at java lang. categorise newInstance0(Class java:335)> at java lang. Class newInstance(categorise java:303)> at org apache ojb broker util. ClassHelper newInstance(Unknown> obtain)> ... 33 more> ---------------------------------------------------------------------To unsubscribe telecommunicate: ojb-user-unsubscribe@db apache orgFor additional commands telecommunicate: ojb-user-help@db apache org

Forex Groups - Tips on Trading

Related article:
http://mail-archives.apache.org/mod_mbox/db-ojb-user/200709.mbox/%3C46E50F7C.20208@apache.org%3E

comments | Add comment | Report as Spam


"Re: Error with nested class" posted by ~Ray
Posted on 2007-11-03 13:45:24

Hi Robert,could you please post the mapping and java source for class Country (I expect that this is the class which declares field 'publicationDates'?) too regards,ArminRobert Giddings wrote:> Hi,> > Can anyone tell me why I get this runtime exception when using OJB as> the inner class is neither abstract nor an interface and has a no> parameter fail constructor. The inner class does increase an abstract> class but that doesn't seem to be a problem.> > Thanks,> > Robert Giddings> > Caused by: org apache ojb broker metadata. MetadataException: Can't> create nested> object of type 'class> com netcase netspat recordSystem bo. Country$CountryDateSe> t' for field 'publicationDates'> at> org apache ojb negociate metadata fieldaccess. PersistentFieldDirectImpl.> set(Unknown obtain)> at> org apache ojb broker accesslayer. RowReaderDefaultImpl buildOrRefresh> Object(Unknown Source)> at> org apache ojb negociate accesslayer. RowReaderDefaultImpl readObjectFrom> (Unknown Source)> at> org apache ojb broker accesslayer. RsIterator getObjectFromResultSet(U> nknown obtain)> at org apache ojb negociate accesslayer. RsIterator next(Unknown> Source)> at> org apache ojb negociate core out. QueryReferenceBroker getCollectionByQuery(> Unknown obtain)> at> org apache ojb broker core out. QueryReferenceBroker getCollectionByQuery(> Unknown obtain)> at> org apache ojb broker core out. QueryReferenceBroker getCollectionByQuery(> Unknown obtain)> at> org apache ojb negociate core. PersistenceBrokerImpl getCollectionByQuery> (Unknown Source)> at> org apache ojb broker core. DelegatingPersistenceBroker getCollectionB> yQuery(Unknown Source)> at> org apache ojb broker core. DelegatingPersistenceBroker getCollectionB> yQuery(Unknown obtain)> at> com netcase database. DAOService getObjectsByType(DAOService java:41)> ... 21 more> Caused by: java lang. InstantiationException:> com netcase netspat recordSystem bo> . Country$CountryDateSet> at java lang. Class newInstance0(Class java:335)> at java lang. Class newInstance(Class java:303)> at org apache ojb broker util. ClassHelper newInstance(Unknown> obtain)> ... 33 more> ---------------------------------------------------------------------To unsubscribe telecommunicate: ojb-user-unsubscribe@db apache orgFor additional commands e-mail: ojb-user-help@db apache org

Forex Groups - Tips on Trading

Related article:
http://mail-archives.apache.org/mod_mbox/db-ojb-user/200709.mbox/%3C46E50F7C.20208@apache.org%3E

comments | Add comment | Report as Spam


"Context initialization failing due to inner class usage" posted by ~Ray
Posted on 2007-10-28 11:43:42

Caused by: org springframework beans factory. BeanCreationException: Error creating bean with label 'customerFormValidator' defined in ServletContext resource [/WEB-INF/app-servlet xml]: Instantiation of bean failed; nested exception is org springframework beans. BeanInstantiationException: Could not instantiate hit class [com models. CustomerBean$CustomerBeanValidator]: No default constructor open; nested exception is java lang. NoSuchMethodException: com models. CustomerBean$CustomerBeanValidator.<init>()Caused by: org springframework beans. BeanInstantiationException: Could not instantiate bean class [com models. CustomerBean$CustomerBeanValidator]: No default constructor found; nested exception is java lang. NoSuchMethodException: com models. CustomerBean$CustomerBeanValidator.<init>()Caused by: java lang. NoSuchMethodException: com models. CustomerBean$CustomerBeanValidator.<init>() at java lang. categorise getConstructor0(Class java:2647) at java lang. Class getDeclaredConstructor(categorise java:1953) at org springframework beans. BeanUtils instantiateClass(BeanUtils java:60) at org springframework beans factory support. SimpleInstantiationStrategy instantiate(SimpleInstantiationStrategy java:45) at org springframework beans factory give. AbstractAutowireCapableBeanFactory instantiateBean(AbstractAutowireCapableBeanFactory java:701) at org springframework beans factory support. AbstractAutowireCapableBeanFactory createBeanInstance(AbstractAutowireCapableBeanFactory java:687) at org springframework beans factory support. AbstractAutowireCapableBeanFactory createBean(AbstractAutowireCapableBeanFactory java:388) at org springframework beans factory give. AbstractBeanFactory$1 getObject(AbstractBeanFactory java:250) at org springframework beans factory give. DefaultSingletonBeanRegistry getSingleton(DefaultSingletonBeanRegistry java:141) at org springframework beans factory give. AbstractBeanFactory getBean(AbstractBeanFactory java:247) at org springframework beans factory support. AbstractBeanFactory getBean(AbstractBeanFactory java:161) at org springframework beans factory support. BeanDefinitionValueResolver resolveReference(BeanDefinitionValueResolver java:245) at org springframework beans factory support. BeanDefinitionValueResolver resolveValueIfNecessary(BeanDefinitionValueResolver java:124) at org springframework beans factory support. AbstractAutowireCapableBeanFactory applyPropertyValues(AbstractAutowireCapableBeanFactory java:1019) at org springframework beans factory support. AbstractAutowireCapableBeanFactory populateBean(AbstractAutowireCapableBeanFactory java:809) at org springframework beans factory give. AbstractAutowireCapableBeanFactory createBean(AbstractAutowireCapableBeanFactory java:425) at org springframework beans factory give. AbstractBeanFactory$1 getObject(AbstractBeanFactory java:250) at org springframework beans factory give. DefaultSingletonBeanRegistry getSingleton(DefaultSingletonBeanRegistry java:141) at org springframework beans factory support. AbstractBeanFactory getBean(AbstractBeanFactory java:247) at org springframework beans factory give. AbstractBeanFactory getBean(AbstractBeanFactory java:161) at org springframework beans factory give. DefaultListableBeanFactory preInstantiateSingletons(DefaultListableBeanFactory java:273) at org springframework context support. AbstractApplicationContext refresh(AbstractApplicationContext java:346) at org springframework web context give. AbstractRefreshableWebApplicationContext refresh(AbstractRefreshableWebApplicationContext java:156) at org springframework web servlet. FrameworkServlet createWebApplicationContext(FrameworkServlet java:308) at org springframework web servlet. FrameworkServlet initWebApplicationContext(FrameworkServlet java:252) at org springframework web servlet. FrameworkServlet initServletBean(FrameworkServlet java:221) at org springframework web servlet. HttpServletBean init(HttpServletBean java:115) at javax servlet. GenericServlet init(GenericServlet java:212) <bean id="customerFormController" class="com controllers. CustomerFormController"> <property label="formView"> <value>client htm</value> </property> <property name="successView"> <determine>client htm</determine> </property> <property label="commandName" determine="customerBean" /> <property name="commandClass"> <ref bean="customerBean" /> </property> <property name="validator"> <ref bean="customerFormValidator" /> </property> <property name="validateOnBinding"> <determine>true</determine> </property> <property name="pageCaption"> <value>Clients</value> </property> </hit> <bean id="customerBean" class="com models. CustomerBean" /> <hit.

Forex Groups - Tips on Trading

Related article:
http://forum.springframework.org/showthread.php?t=43610

comments | Add comment | Report as Spam


"Context initialization failing due to inner class usage" posted by ~Ray
Posted on 2007-10-28 11:43:42

Caused by: org springframework beans factory. BeanCreationException: Error creating bean with label 'customerFormValidator' defined in ServletContext resource [/WEB-INF/app-servlet xml]: Instantiation of bean failed; nested exception is org springframework beans. BeanInstantiationException: Could not represent bean class [com models. CustomerBean$CustomerBeanValidator]: No fail constructor open; nested exception is java lang. NoSuchMethodException: com models. CustomerBean$CustomerBeanValidator.<init>()Caused by: org springframework beans. BeanInstantiationException: Could not instantiate bean class [com models. CustomerBean$CustomerBeanValidator]: No fail constructor found; nested exception is java lang. NoSuchMethodException: com models. CustomerBean$CustomerBeanValidator.<init>()Caused by: java lang. NoSuchMethodException: com models. CustomerBean$CustomerBeanValidator.<init>() at java lang. categorise getConstructor0(Class java:2647) at java lang. categorise getDeclaredConstructor(Class java:1953) at org springframework beans. BeanUtils instantiateClass(BeanUtils java:60) at org springframework beans factory give. SimpleInstantiationStrategy instantiate(SimpleInstantiationStrategy java:45) at org springframework beans factory give. AbstractAutowireCapableBeanFactory instantiateBean(AbstractAutowireCapableBeanFactory java:701) at org springframework beans factory support. AbstractAutowireCapableBeanFactory createBeanInstance(AbstractAutowireCapableBeanFactory java:687) at org springframework beans factory give. AbstractAutowireCapableBeanFactory createBean(AbstractAutowireCapableBeanFactory java:388) at org springframework beans factory support. AbstractBeanFactory$1 getObject(AbstractBeanFactory java:250) at org springframework beans factory give. DefaultSingletonBeanRegistry getSingleton(DefaultSingletonBeanRegistry java:141) at org springframework beans factory support. AbstractBeanFactory getBean(AbstractBeanFactory java:247) at org springframework beans factory support. AbstractBeanFactory getBean(AbstractBeanFactory java:161) at org springframework beans factory give. BeanDefinitionValueResolver resolveReference(BeanDefinitionValueResolver java:245) at org springframework beans factory give. BeanDefinitionValueResolver resolveValueIfNecessary(BeanDefinitionValueResolver java:124) at org springframework beans factory give. AbstractAutowireCapableBeanFactory applyPropertyValues(AbstractAutowireCapableBeanFactory java:1019) at org springframework beans factory support. AbstractAutowireCapableBeanFactory populateBean(AbstractAutowireCapableBeanFactory java:809) at org springframework beans factory give. AbstractAutowireCapableBeanFactory createBean(AbstractAutowireCapableBeanFactory java:425) at org springframework beans factory support. AbstractBeanFactory$1 getObject(AbstractBeanFactory java:250) at org springframework beans factory support. DefaultSingletonBeanRegistry getSingleton(DefaultSingletonBeanRegistry java:141) at org springframework beans factory give. AbstractBeanFactory getBean(AbstractBeanFactory java:247) at org springframework beans factory support. AbstractBeanFactory getBean(AbstractBeanFactory java:161) at org springframework beans factory support. DefaultListableBeanFactory preInstantiateSingletons(DefaultListableBeanFactory java:273) at org springframework context support. AbstractApplicationContext call back(AbstractApplicationContext java:346) at org springframework web context support. AbstractRefreshableWebApplicationContext call back(AbstractRefreshableWebApplicationContext java:156) at org springframework web servlet. FrameworkServlet createWebApplicationContext(FrameworkServlet java:308) at org springframework web servlet. FrameworkServlet initWebApplicationContext(FrameworkServlet java:252) at org springframework web servlet. FrameworkServlet initServletBean(FrameworkServlet java:221) at org springframework web servlet. HttpServletBean init(HttpServletBean java:115) at javax servlet. GenericServlet init(GenericServlet java:212) <bean id="customerFormController" class="com controllers. CustomerFormController"> <property name="formView"> <determine>client htm</value> </property> <property label="successView"> <determine>client htm</value> </property> <property name="commandName" value="customerBean" /> <property label="commandClass"> <ref bean="customerBean" /> </property> <property label="validator"> <ref bean="customerFormValidator" /> </property> <property label="validateOnBinding"> <determine>true</value> </property> <property name="pageCaption"> <value>Clients</value> </property> </bean> <bean id="customerBean" class="com models. CustomerBean" /> <hit.

Forex Groups - Tips on Trading

Related article:
http://forum.springframework.org/showthread.php?t=43610

comments | Add comment | Report as Spam


"The transformer "testanme" does not support source type "org.jboss ..." posted by ~Ray
Posted on 2007-10-23 15:39:31

Hi.. I am getting error while using Transformers. Here is mule-config:<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE mule-configuration PUBLIC "-//MuleSource //DTD mule-configuration XML V1.0//EN" ""><mule-configuration id="axis_client_endpoint" version="1.0"><mule-environment-properties synchronous="true"/> <connector label="jmsConnector1"className="org mule providers jms. JmsConnector"> <properties> <property label="jndiInitialFactory"value="org jnp interfaces. NamingContextFactory"/> <property label="jndiProviderUrl" value="jnp://localhost:1044"/> <property label="connectionFactoryJndiName"value="ConnectionFactory"/> </properties> </connector> <transformers> <transformer name="ObjectToJMSMessage" className="org mule providers jms transformers. ObjectToJMSMessage" returnClass="javax jms. ObjectMessage"> <properties> <property name="acceptUMOMessage" value="true"/> </properties> </transformer> <transformer name="testanme" className="com fic framework mule transformer. MyTestTransformer" returnClass="java lang. String" > <properties> <property name="acceptUMOMessage" determine="true"/> </properties> </transformer></transformers><copy name="CheckLoginModel"><mule-descriptor label="CheckLoginBridge" implementation="org mule components simple. BridgeComponent"> <inbound-router> <endpoint address="jms://stand:A" transformers="testanme"/> </inbound-router> <outbound-router> <router className="org mule routing outbound. OutboundPassThroughRouter"> <endpoint address="jms://stand:B" transformers="ObjectToJMSMessage"/> </router> </outbound-router></mule-descriptor></copy></mule-configuration>The exception which I am getting is:2007-09-11 21:18:24,201 [jmsConnector1 receiver.1] ERROR - ********************************************************************************communicate : The transformer "testanme" does not support source type "org jboss mq. SpyObjectMessage". Endpoint is "jms://queue:A"write : org mule umo transformer. TransformerExceptionlabel : MULE_ERROR-65054Transformer : MyTestTransformer{this=5bb966 label='testanme' ignoreBadInput=false returnClass=class java lang. String sourceTypes=[class java lang. arrange]}JavaDoc : ********************************************************************************Exception lade is:1. The transformer "testanme" does not support source type "org jboss mq. SpyObjectMessage". Endpoint is "jms://stand:A" (org mule umo transformer. TransformerException) org mule transformers. AbstractTransformer:237 ()********************************************************************************Root Exception stack analyse:org mule umo transformer. TransformerException: The transformer "testanme" does not support source type "org jboss mq. SpyObjectMessage". Endpoint is "jms://queue:A" at org mule transformers. AbstractTransformer alter(AbstractTransformer java:237) at org mule impl. MuleEvent getTransformedMessage(MuleEvent java:342) at org mule routing inbound. ForwardingConsumer process(ForwardingConsumer java:49) at org mule routing inbound. InboundRouterCollection route(InboundRouterCollection java:86) at org mule providers. AbstractMessageReceiver$DefaultInternalMessageListener onMessage(AbstractMessageReceiver java:581) at org mule providers. AbstractMessageReceiver routeMessage(AbstractMessageReceiver java:322) at org mule providers. AbstractReceiverWorker$1 doInTransaction(AbstractReceiverWorker java:105) at org mule transaction. TransactionTemplate kill(TransactionTemplate java:92) at org mule providers. AbstractReceiverWorker doRun(AbstractReceiverWorker java:122) at org mule providers. AbstractReceiverWorker run(AbstractReceiverWorker java:60) at org mule impl work. WorkerContext run(WorkerContext java:310) at edu emory mathcs backport java util concurrent. ThreadPoolExecutor runWorker(ThreadPoolExecutor java:987) at edu emory mathcs backport java util concurrent. ThreadPoolExecutor$Worker run(ThreadPoolExecutor java:528) at java lang. Thread run(Unknown Source)********************************************************************************I am using mule 1.4.2 version. Thanks in advance

Forex Groups - Tips on Trading

Related article:
http://www.nabble.com/forum/ViewPost.jtp?post=12617744&framed=y

comments | Add comment | Report as Spam


 

 




blogs - aa blogs - air force blogs - aquarius blogs - aries blogs - army blogs - arts blogs - baby blogs - blogs 4 men - blogs 4 women - cancer blogs - capricorn blogs - career change blogs - choice blogs - christmas blogs - cigar blogs - cigarette blogs - cig blogs - coast guard blogs - coffee bean blogs - college baseball blogs - college basketball blogs - college football blogs - colleges blogs - computer blogs - create blogs - dating blogs - elvis blogs - email chat blogs - email pal blogs - enhancement blogs - fall blogs - fha blogs - freedom blogs - friendly blogs - funny blogs - gambler blogs - gemini blogs - her blog - his blog - hockey blogs - join blogs - javas blogs - kid safe blogs - leo blogs - libra blogs - apartments blogs - coffees blogs - horoscopes blogs - life advice blogs - lover blogs - marine blogs - married blogs - military blogs - misc blogs - more money blogs - mortgage blogs - move blogs - movies blogs - musical blogs - navy blogs - new in town blogs - obscure blogs - online date blogs - online game blogs - over 30 blogs - over 40 blogs - over 50 blogs - over 60 blogs - over 70 blogs - over 80 blogs - over 90 blogs - password blogs - pc blogs - mortgages blogs - peoples blogs - pictures blogs - pipe blogs - pisces blogs - poems blogs - poker blogs - police blogs - political blogs radio blogs - read blogs - recreational vehicle blogs - relocation blogs - reserve blogs - rv blogs - safe blogs - scorpio blogs - singles blogs - smokers blogs - smoker blogs - state blogs - state college blogs - taurus blogs - teen advice blogs - teenager blogs - tobacco blogs - tv blogs - vacation blogs - veteran blogs - virgo blogs - virtual blogs - weekly blogs - wingman blogs - word blogs - words blogs - writer blogs - poetry blogs - prescription blogs - sagittarius blogs - straight blogs - summer blogs - gi blogs - hooka blogs - penis enlargement blogs - vfw blogs - casinos blogs - casino blogs - web hosting blogs - hosting blogs - auto blogs - truck blogs - van blogs - suv blogs - 4 wheel blogs - harley blogs - flu blogs - diet blogs - pistols blogs - teenage blogs - lpga blogs - burnable blogs - new tunes blogs - coaching blogs - treasures blogs - trades blogs - nutty blogs - skate blogs - play 21 blogs - weather blogs - poker players - golf blogs - american blogs - football blogs - baseball blogs - hockey blogs - basketball blogs - soccer blogs - cooking blogs - recipe blogs - space blogs - 3d games blogs - barbecue blogs




the class java archives:

11 articles in 2006-01
22 articles in 2006-02
27 articles in 2006-03
36 articles in 2006-04
27 articles in 2006-05
26 articles in 2006-06
24 articles in 2006-07
18 articles in 2006-08
22 articles in 2006-09
30 articles in 2006-10
22 articles in 2006-11
22 articles in 2006-12
12 articles in 2007-01
12 articles in 2007-02
3 articles in 2007-03
7 articles in 2007-04
11 articles in 2007-05
10 articles in 2007-06
3 articles in 2007-07
1 articles in 2007-09




next page


class java