Showing posts with label Weblogic. Show all posts
Showing posts with label Weblogic. Show all posts

Friday, July 26, 2013

Liferay 6.1/weblogic 12.1.1 java.lang.ClassCastException: com.liferay.portal.kernel.servlet.NonSerializableObjectHandler cannot be cast to java.lang.String

If you get this exception, don't try to debug, especially if you are using Weblogic with closed servlet code.
It is just as simple as problems with having not the same Servlet name in your web.xml as in your portlet.xml.

Liferay wants to have servlets name conteain portlet name in web.xml. Example
<servlet>
     <servlet-name>ListPortlet Servlet</servlet-name>
     .....
</servlet>

<portlet>
  <portlet-name>ListPortlet</portlet-name>
  <display-name>Highcharts List portlet</display-name>
....
</portlet>

So be aware, if your Portlet names don't match, you get this nasty exception. And it means that you need to reconsider your web.xml again.

Monday, July 8, 2013

Configure Weblogic 12 Cluster on Windows and run it locally (Weblogic 12.1.1)

    Here is a scenario how to configure Cluster locally on Windows
  • Start Node Manager (${WEBLOGIC_HOME}/wlserver_12.1/server/bin/startNodeManager.bat {.sh})

  • Start your Weblogic domain (we'll reference it as default domain, that is located at ${WEBLOGIC_HOME/user_projects/domains/base_domain/startWebLogic.cmd {.sh}})

  • Go to weblogic console and log in (if you haven't changed the port for your domain server, than it is http://localhost:7001/console)

  • Go to Environment (Umgebung) -> Computer (Rechner) and add new "Machine"

  • Don't forget to register here your NodeManager correctly. My nodemanager port number is 5556. And my nodeManager runs at localhost and uses SSl Listener Type.

  • Think about giving more memory to your server, otherwise it might be hard to deploy anything on it.

  • After you are done with it, go to Environment (Umgebung) -> Server and Add a new "server", that you will name ManagedServer.

  • After you are done with it, go to Environment (Umgebung) -> Cluster and create a new "Cluster". Then add your newly created ManagedServer to your Cluster.

  • Restart your NodeManager and your weblogic base_domain.

  • Now you are done and you can start your ManagedServer. After you started your ManagedServer, wait until the ManagedServer will get into the "Running status". Running status means that it's done and ready to be used.

    Happy Testing!