Klament J. Kruoghst

Ranch Hand
+ Follow
since Oct 24, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Klament J. Kruoghst

I tried running it on the HD and it didn't work either, i wanted to stick to my laptop so i really needed to make this work. If any other windows 8.1 user runs into this (or anybody else for that matter) here's how I solved it:

Download Orca from Microsoft's page. Open the setup.msi file in Orca and under the "Property" table change the value of the "SHAREDADDINFOLDER" to "c:\".

Try again, this time it will work.

Cheers,
Hi, I got the book yesterday from Kathy and Bert OCA/OCP Java SE 7 Study Guid I and II. So I'm trying to install the CD to check the exam and it's failing.. here are the errors and what i tried:

I put the CD and it didn't auto run, so as per readme in the CD I went to "Run" and ran it from there and here's the error that i got during installation:


Tried to run the Installer.exe manually.... and i got the same error... so what do i do? I pre-ordered this book in Amazon........
Hi there, I have a stateless session bean that sends a message to a queue.

The messages can be sent with a delay so I'm setting the default delay to -1 (no delay) and i have a setter and getter for it defined too.

One type of message has a delay of X seconds, all others use its default. So when I'm calling the bean i:

local = localHome.create();
local.setDelay(delay);
local.sendMessage("my message");
....
} finally {
...
local.remove();
}

The other calls go the same but without the setDelay call. The problem is that this delay doesn't seem to be setting. For instance if I don't set a delay it's going to pick the delay of the previous call (instead of picking my default delay of -1)

So I guess when the variable is changed by the first call and the bean is put back to the pool with that delay it's changed for the next called so... I tried putting the setDelay to -1 in the ejbCreate() which although it's not called when i do the loca.create(), it is supposed to be triggered when a business method is called so I thought would be triggered by the local.sendMessage() but the same thing is happening. I read that even when you call local.remove() it doesn't mean ejbRemove() will be called so I can't use that either, so...

How do I go about receiving a default value for a Stateless session bean each time it's called?

Thanks
Hi there,

I'm trying to package under the EAR an EJB and a WAR with maven... it all builds fine and deploys.. when i try to perform any action sitting in my war I get:

java.lang.ClassNotFoundException: this.is.MyActionClass1 at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:297) at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at ....

Here this.is.MyActionClass1 is in my WAR. all my action classes are in my WAR, the GUI where the action is being triggered from obviously is in the WAR also, so why won't these actions be picked up? I also tried setting <prefer-web-inf-classes>true</prefer-web-inf-classes> and rebuild, restarting the server, cleaning cache, it didn't work either. What can i do in maven to get my app finding the class in its own war?.

I also tried using the following on my war pom for struts.jar which is the only lib that has the same dependency on the ear, but that didn't work either.
<type>pom</type>
<scope>provided</scope>

Why can't my EAR pick up my action classes in the war!

Thanks,
12 years ago

This script file is located under:

<WL8 HOME>/weblogic81/common/bin/commEnv.cmd (for Windows)
<WL8 HOME>/weblogic81/common/bin/commEnv.sh (for UNIX)



I added -Xprof to the arg list in that file and restarted the server.
I log into the application and play around but I do not see any output in the console coming out.... ? what am I missing.

Thanks.
13 years ago
Thanks for the response.

I'm not too clear on #1 tho so I'm gonna go ahead straight to #2, I just need to upload some queue names so that shouldn't need step #1 I don't think.

Thanks again!
Hi there,

I'm building a web application and I want to be able to move one of the property files externaly so that I don't have to re-reploy the whole application when I do a change to this xml file.
Any ideas how to achieve this?

Oh and I'm using Ant to build my webapp if that helps.
No, no, i know it's the Strategy Pattern hence why i said I was reading a design document and why im asking why it's better, why send me to google to read what im already reading lol... so i guess the answer is just cause it's a small example it might as well work the Motor class approach, I like the testing answer as well I did not think of that, thanks.

Now for your question:

What if you go by bicycle or surfboard?


Wouldn't that be the same thing? they'll have to create yet another implementation of the IGo interface and i'd create another method. OK maybe Motor wasn't a good name, I might as well call it Go class and it still holds true.

But thanks for the answer to Pat Farrell.
13 years ago
Hi I'm reading a design document for good practices in Java and I keep wondering if someone can explain one thing to me.

The problem is how to go about designing a program where you can use any type of vehicles and move them, but each type of vehicle moves differently, i.e a plane or a car.
So they suggest to do it this way:



Then they have 1 class per type of movement:



..... etc etc...

isn't this too much? plus if you have to change it you have to go to each implementation. Why is this better than this:



Where you can change it in just one class. Anyone?

Thanks
13 years ago
Hi there, I need to be able to see and modify an xml value i'm reading.
I'm trying to use import org.apache.xpath.XPathAPI but if there's a better library let me know.

I used to be able to do so using xpath when the xml structure was:



by using /root/employeeA/text() to get "jones" but now the xml structure has changed to the following:




I've tried: /root/node1/node2/employees[@name='employeeA'] but it doesn't work because I need the value of the other property, how do I use xpath to modify the value when it is set as an attribute!

Thanks in advanced
14 years ago
Hi there,

1)I have a string of this type of format: dd MMM yyyy.
2)I want to end up with a Timestamp of this format: yyyy-mm-dd hh:mm:ss

I've gone back and forth between string, date, formatter, timestamp and I keep getting exceptions of all kinds, can anyone post a code that would begin with and end with the above formats in those type of objects?

Thanks in advance
14 years ago
Hi there, I have a build script (scriptA) importing another build script (scriptB) - they are both in different directories. I'm calling a target on the ScriptA using antcall but I need to override a property name on scriptA from scriptB.
In an example this is what i'm trying to say:

ScriptA


ScriptB


The basic problem at the end of the day is that when I'm calling ScriptA from ScriptB the prop1 path seems to be running from ScriptA home directory not from ScriptB's home directory.

any ideas?

Thanks
14 years ago

Hi there,
My form has a date property in certain format. I'm trying to display it and send it back with a different format. Displaying it is easy with fmt:formatDate. The problem is when I return back that field back to the servlet it has the original format. Here's the code



I'm expecting this to return the item.date in that format i'm giving it, but im getting the original format when I debug into what I get dd-mm-yyyy.

Any ideas how i can achieve this?

Thanks!
14 years ago
JSP
Hi there,

I just saw in some code this:


Can someone explain to me the use of those brakets? I'm not sure if it's related to the Map or iterator declaration so that's why im putting it there, maybe it does maybe it doesn't
That doesn't look like an inner class and that doesn't look like an if/else statement, so what is it and why would someone want to use it.

Thanks,
14 years ago
Hi there,

So I have an object called ObjNum1 that has an arraylist of objects ObjNum2.
I'm trying to iterate ObjNum2 to get its properties so here's a sample of the code:



It does iterate and gets me the values, the problem is i have to retrieve the value back so I need the full path, that's to say that I need this generated in the html:


but I'm getting this:



How do I change my code then to not forget my ObjNum1?

Thanks in advance
14 years ago