Its ok to make mistakes, its ok to repeat it.
But please make it a point to learn from it :)
Tuesday, December 25, 2007
VMware tools not running
Problem:
Cannot install VMware tools by selecting the install on the menu
Possible Solutions:
1) VMware tools run by loading an ISO image into the CD drive, if autorun is disabled, it cannot install automatically.
In the VM, go to the CD drive, it should be loaded with VMware tools setup. Run setup.exe manually from there.
2) The VM OS could be hardened. Windows Installer may be disabled, thus VMware tools setup can't run.
Run the following command
msiexec.exe /regserver
Ensure that the service Windows Installer is up and running. Try running VMware tools again.
Trick - Locking a windows folder
Trick:
Locking a windows folder
Solution:
I got this somewhere on the net.
1) Consider you want to lock a folder named caclub in your f:\, whose path is f:\caclub
2) Now open the Notepad and type the following ren caclub caclub.{21EC2020-3AEA-... More»1069-A2DD-08002B30309D}
3) Where caclub is your folder name. Save the text file as loc.bat in the same drive.
4) Open another new notepad text file and type the following ren caclub.{21EC2020-3AEA-1069-A2DD-08002B30309D} caclub
5) Save the text file as unloc.bat in the same drive. --------- Usage: ---------
6) To lock the caclub folder, simply click the loc.bat and it will transform into control panel icon which is inaccessible.
7) To unlock the folder click the unloc.bat file. Thus the folder will be unlocked and the contents are accessible.
Locking a windows folder
Solution:
I got this somewhere on the net.
1) Consider you want to lock a folder named caclub in your f:\, whose path is f:\caclub
2) Now open the Notepad and type the following ren caclub caclub.{21EC2020-3AEA-... More»1069-A2DD-08002B30309D}
3) Where caclub is your folder name. Save the text file as loc.bat in the same drive.
4) Open another new notepad text file and type the following ren caclub.{21EC2020-3AEA-1069-A2DD-08002B30309D} caclub
5) Save the text file as unloc.bat in the same drive. --------- Usage: ---------
6) To lock the caclub folder, simply click the loc.bat and it will transform into control panel icon which is inaccessible.
7) To unlock the folder click the unloc.bat file. Thus the folder will be unlocked and the contents are accessible.
Oracle OEM wrong password
Problem:
Although you are damn sure the password is right, but OEM simply doesn't agree.
Solution:
You might have changed your security policies (hardened??).
GO local security policy, add the windows/AD user to 'Log on as batch job'
Although you are damn sure the password is right, but OEM simply doesn't agree.
Solution:
You might have changed your security policies (hardened??).
GO local security policy, add the windows/AD user to 'Log on as batch job'
Oracle OEM died
Problem:
I only changed my Oracle server's IP or hostname and the whole Oracle Enterprise Manager thing died on me!
Solution:
Oracle OEM depends on the IP and Hostname that is during the installation. So if its changed, things will go wrong.
Soln:
Perform the following steps.
1) Run the following, this will remove entire OEM setup from Oracle
emca -deconfig dbcontrol db -repos drop
2) RUn the following, this will remove the orphaned OEM console service
sc delete consoleServiceName
3) Remove the existing listener with Net Configuration Assistant.
4) Change listener.ora and tnsnames.ora to fit the current IP and hostname settings.
5) Restart the remaining oracle services. (Restart comp if not sure)
6) Add new listeneer with Net Config Assistant
7) Ensure Listener and Database instance are up
Run the following, this will reinstall the entire OEM setup for oracle.
emca -config dbcontrol db -repos create
8) Open the Enterprise Manager Console and try again
Oracle database cannot start
Problem:
Oracle database 10g simply refuse to start.
Possible solutions:
1) The listener may not be working properly. If sample database was not created during first database creation, then a listener is not included in installation. Run Net Configuration Manager to create a new listener.
2) System just rebooted, services has not started yet. Type services.msc and check if the oracle services are up.
Oracle cannot connect
Problem:
'Cannot connect to database using existing credentials".
This may happen even though you are damn sure you got the username and password correct.
Possible Solution:
Oracle do not accept certain characters such as '.' and ';' and probably many others. So to be safe, use alphanumeric characters.
* During the setting of username and password, Oracle won't complain of illegal characters, but when it comes to logging in, the above error occurs *
'Cannot connect to database using existing credentials".
This may happen even though you are damn sure you got the username and password correct.
Possible Solution:
Oracle do not accept certain characters such as '.' and ';' and probably many others. So to be safe, use alphanumeric characters.
* During the setting of username and password, Oracle won't complain of illegal characters, but when it comes to logging in, the above error occurs *
JMS unsupported encoding
Problem:
During runtime of a java application, an unsupported encoding for JMS message might appear during JMS operations.
Solution:
A quick fix would be to use the SDK as the runtime JVM instead.
During runtime of a java application, an unsupported encoding for JMS message might appear during JMS operations.
Solution:
A quick fix would be to use the SDK as the runtime JVM instead.
Clicking on jnlp does not open java app
Problem:
By default, Microsoft's IIS mime extensions do not recognize .jnlp files. So clicking on jnlp links on a web page hosted by IIS will simply open a xml document, as best.
Solution:
In the container of the website hosting the .jnlp files, add a mime type/extension as follows.
extension: .jnlp
content type (mime): application/x-java-jnlp-file
Sunday, October 14, 2007
axis2 + weblogic > Cannot load dll
There might be times where your java web service code need to load some dlls (Dynamic Link Libraries) for some of the operations. Usually we would put those dll in the same path of the class files, but in this case, it won't work. I also tried fiddling around with the java.library.path but it doesn't seems to work for me.
So for now, here's a temporary resolution.
Place all the dlls in 'C:\bea\weblogic81\server\bin', or wherever you installed your weblogic.
So for now, here's a temporary resolution.
Place all the dlls in 'C:\bea\weblogic81\server\bin', or wherever you installed your weblogic.
Sunday, September 16, 2007
More axis2 with weblogic
Prob: I keep getting this error on axis2.
org.apache.axis2.AxisFault: Class org/xml/sax/InputSource violates loader constraints
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:434)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:373)
at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294)
There's a conflict for the following jars somewhere.
- xalan-2.7.0.jar, xercesImpl-2.8.1.jar, xml-apis-1.3.03.jar, serializable.jar
Resolve the conflict and thats it.
Tip: I read somewhere that you could edit web.xml to make it load from somewhere else.....
org.apache.axis2.AxisFault: Class org/xml/sax/InputSource violates loader constraints
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:434)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:373)
at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294)
There's a conflict for the following jars somewhere.
- xalan-2.7.0.jar, xercesImpl-2.8.1.jar, xml-apis-1.3.03.jar, serializable.jar
Resolve the conflict and thats it.
Tip: I read somewhere that you could edit web.xml to make it load from somewhere else.....
Sunday, August 12, 2007
Axis2 (or not)
This is a Keep In View topic
Encountered this new issue with my web service.
I am not familiar with the workings of web services, so ain't too sure if its supposed to behave this way.
I noted my web service's POJO running its constructor (no-args) everytime a client stub calls it. Somehow, the instance variables generated earlier are not being reused, and a new one is created.
Ain't sure whats really wrong.....will keep myself updated here.
[PS: The answer to this issue lies within session management. See comment for details.]
Encountered this new issue with my web service.
I am not familiar with the workings of web services, so ain't too sure if its supposed to behave this way.
I noted my web service's POJO running its constructor (no-args) everytime a client stub calls it. Somehow, the instance variables generated earlier are not being reused, and a new one is created.
Ain't sure whats really wrong.....will keep myself updated here.
[PS: The answer to this issue lies within session management. See comment for details.]
Saturday, August 4, 2007
Weblogic 8.1 + Axis2
I was tasked to create a few web services using SOAP, with all the wsdl and stuff. I was recommended to use Axis2 after someone made an evaluation and found it good and easy to use.
So there i was using the bottom up approach by coding my exposed method, thereafter running the Axis2 plugins on my Eclipse 3.1.2. There were a few weird issues,
1) Somehow the archiver plug-in couldn't load some of my jars that was packaged with my base code. I had to pack up the aar file myself after reading some specifications.
2) Upon loading the aar in Weblogic, i realized that the jar files in the archive's lib folder are not being read. Resulting in several NoClassFound exceptions. As a work around, i had to place those jars in a separate directory in Axis2's web-inf/lib folder.
3) You might have guessed, somehow File(filename) codes point to Weblogic's domain folder as the root. I couldn't find my configuration files because of this. No time to mess around and thus have to throw my configuration files in those directories as well.
Its probably because i had implemented Axis2's web services incorrectly, but if the same aar is loading in Tomcat, it works..... go figure....
So there i was using the bottom up approach by coding my exposed method, thereafter running the Axis2 plugins on my Eclipse 3.1.2. There were a few weird issues,
1) Somehow the archiver plug-in couldn't load some of my jars that was packaged with my base code. I had to pack up the aar file myself after reading some specifications.
2) Upon loading the aar in Weblogic, i realized that the jar files in the archive's lib folder are not being read. Resulting in several NoClassFound exceptions. As a work around, i had to place those jars in a separate directory in Axis2's web-inf/lib folder.
3) You might have guessed, somehow File(filename) codes point to Weblogic's domain folder as the root. I couldn't find my configuration files because of this. No time to mess around and thus have to throw my configuration files in those directories as well.
Its probably because i had implemented Axis2's web services incorrectly, but if the same aar is loading in Tomcat, it works..... go figure....
Tuesday, June 26, 2007
Swing
This ain't really a dumb mistake or anything like that, but it kept me in the office till pretty late in the night today so i will give it credit by posting it here.
There will come a time when you need to do some fancy stuff like changing ur cursor's icon while you are hovering a Swing component. What i tried today was to change my cursor while hovering across a JLabel. What was supposed to be a one liner turned out to be irritating. Somehow the JLabel's setCursor() method won't work, in the end i had to resort to creating some MouseListeners over the Jlabel and set cursor for the frame instead. Its quite untidy but i guess its a temporary patch.
There will come a time when you need to do some fancy stuff like changing ur cursor's icon while you are hovering a Swing component. What i tried today was to change my cursor while hovering across a JLabel. What was supposed to be a one liner turned out to be irritating. Somehow the JLabel's setCursor() method won't work, in the end i had to resort to creating some MouseListeners over the Jlabel and set cursor for the frame instead. Its quite untidy but i guess its a temporary patch.
Sunday, June 10, 2007
explorer.exe - 100% cpu load
Its kinda stagnant to be digging into my own mistakes all the time, lets be a bit more adventurous by looking at what other people do as well. And which software has a large number of bugs with a huge user base? That has to be Micro$oft.
Alright, here goes.
If you encountered issues with your windows explorer slowing down and even hanging on you at wierd times, take a look at your task manager, its probably eating your CPU cycles. What may have happened is that during your traversal of folders in Windows Explorer, it got stuck with retrieving certain meta for some files, particularly AVI files. So one way is to disable Windows Explorer's nosey behaviour through the following methods.
Pls backup before you do the following
1. Start --> Run --> type regedit
2. Goto HKEY_CLASSES_ROOT\SystemFileAssociations\.avi\shellex\PropertyHandler
3. Delete it
Note: This will also solve issues where you can't delete certain avi files.
Note: You can extend this method to extensions of other types as well.
Alright, here goes.
If you encountered issues with your windows explorer slowing down and even hanging on you at wierd times, take a look at your task manager, its probably eating your CPU cycles. What may have happened is that during your traversal of folders in Windows Explorer, it got stuck with retrieving certain meta for some files, particularly AVI files. So one way is to disable Windows Explorer's nosey behaviour through the following methods.
Pls backup before you do the following
1. Start --> Run --> type regedit
2. Goto HKEY_CLASSES_ROOT\SystemFileAssociations\.avi\shellex\PropertyHandler
3. Delete it
Note: This will also solve issues where you can't delete certain avi files.
Note: You can extend this method to extensions of other types as well.
Wednesday, May 30, 2007
StackOverflow
I am pretty sure a lot of programmers encountered the StackOverflow error.
To be frank, in my early programming adventures, i never thought too much about the stack. 'Just another theory thing', i thought. But then, i learned my lessons.
Now, there ain't a lot of ways to cause stack overflows, but if you are really feeling itchy, the following mistake will certainly create it.
But usually when i create stackoverflows, its usually because i call such recursive methods which are residing in different classes. So be careful, u never know when you create such a situation in the jungle of code.
To be frank, in my early programming adventures, i never thought too much about the stack. 'Just another theory thing', i thought. But then, i learned my lessons.
Now, there ain't a lot of ways to cause stack overflows, but if you are really feeling itchy, the following mistake will certainly create it.
public void methodB() { methodA(); } | -- Call one of these methods -- | public void methodA() { methodB(); } |
Saturday, May 26, 2007
if statements
Method 1: if(isTrue()) doSomething() | <--- identical ---> | Method 2: if(isTrue()) { doSomething() } |
Me being the bad programmer, found myself debugging for a looonnnnggg time over a very stupid mistake made from the above convenience.
I used the first method somewhere in the thick jungle of my code. After some weeks, i decided to add some operation that would do another thing before the doSomething() function, along with many other changes.
As you might have guessed, i forgot the braces, and what happens next is an hour of scratching head and tearing of hair. :)
I felt like giving myself a tight slap when i found out why my code did not work as expected.
Subscribe to:
Posts (Atom)