I get the error:

```
Caused by: java.lang.ClassCastException: com.xxx.JbossBirtPortlet cannot be cast to  javax.portlet.Portlet
   at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.start(PortletContainerImpl.java:254)

```

The error is because of a Classloader conflict of tomcat and my portlet, that loads file portlet.jar according to these links:
<https://community.jboss.org/thread/81246?tstart=0>

[Deploying a simple Portlet to Liferay - ClassCastException](https://stackoverflow.com/questions/2366452/deploying-a-simple-portlet-to-liferay-classcastexception)

Then the problem:
I need portlet.jar to build my war but my war must not contain portlet.jar, because then arises a ClassLoader conflict.I can not delete portlet.jar from tomcat, because it is needed to other portlets.

So how do I resolve this?