Netbeans fails to start Apache Tomee 1.7

In server.xml, remove the server=”Apache TomEE” attribute from the connector:

<Connector port="8080" protocol="HTTP/1.1"
           connectionTimeout="20000"
           redirectPort="8443" xpoweredBy="false"
           server="Apache TomEE" />

In bin/catalina.bat: line 179 and 184 change:

:noJuliConfig
set "JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%"

..

:noJuliManager
set "JAVA_OPTS=%JAVA_OPTS% %LOGGING_MANAGER%"

to

:noJuliConfig
set JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%

.. 

:noJuliManager
set JAVA_OPTS=%JAVA_OPTS% %LOGGING_MANAGER%

(Basically remove the “”)

Advertisements

Using Jackson json parser in Apache Tomee 1.5 rest

Code in WEB-INF/openejb-jar.xml for every rest bean, in this case MobileRest:

    <pojo-deployment class-name="com.origami.catastro.mobile.rest.MobileRest">
        <properties>
            cxf.jaxrs.providers = jsonProvider, jaxbProvider
        </properties>
    </pojo-deployment>

Add services in WEB-INF/resources.xml:

<?xml version="1.0" encoding="UTF-8"?>
<resources>
  <Service class-name="org.codehaus.jackson.jaxrs.JacksonJsonProvider" id="jsonProvider"/>
  <Service class-name="org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider" id="jaxbProvider"/>
  <Resource id="smbcatas documental dev" type="javax.sql.DataSource">#Fri May 16 11:29:49 COT 2014
jdbcDriver=org.postgresql.Driver
password=asdfasdfasdf
userName=asdfasdfasdf
jdbcUrl=jdbc\:postgresql\://193.87.122.200\:5432/smbcatas
</Resource>
</resources>