Tuesday, December 25, 2007

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 *

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.

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.

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.....