Tuesday, September 10, 2013

ATG: Template Error: category error 2

I started getting this error after a merge of code. No clue why this happened but it was impeding my work.

The CategoryLookup droplet (/atg/commerce/catalog/CategoryLookup) was the one failing . So I turned on debug mode to have more information. I got this:

14:01:43,960 INFO  [CategoryLookup] DEBUG Find item: id=BRAND_OPTIMUM; type=category
14:01:43,961 INFO  [CategoryLookup] DEBUG Item Found:category:BRAND_OPTIMUM
14:01:43,961 INFO  [CategoryLookup] DEBUG Is item in catalog catalog:masterCatalog
14:01:43,961 INFO  [CategoryLookup] DEBUG This item is not in the correct catalog.

A more expert person  on ATG told me there is a catalog maintenance page that is used to solve this kind of issues:

Basic Catalog Maintenance


Basically, I just ran the process and issues were solved.

Monday, September 9, 2013

Flyway: No enum const class com.googlecode.flyway.core.api.MigrationState.SUCCESS

This exception thrown by Flyway:

java.lang.IllegalArgumentException: No enum const class com.googlecode.flyway.core.api.MigrationState.SUCCESS 
        at java.lang.Enum.valueOf(Enum.java:214)
        at com.googlecode.flyway.core.api.MigrationState.valueOf(MigrationState.java:21)
        at com.googlecode.flyway.core.metadatatable.MetaDataTable$MigrationInfoRowMapper.mapRow(MetaDataTable.java:382)
        at com.googlecode.flyway.core.metadatatable.MetaDataTable$MigrationInfoRowMapper.mapRow(MetaDataTable.java:370)
        at com.googlecode.flyway.core.util.jdbc.JdbcTemplate.query(JdbcTemplate.java:319)

happens because an invalid value in the column state. In my case it was failing because of an extra blank space I didn't notice.

Friday, September 6, 2013

Juniper VPN: sysdeps.error Failed to open /etc/resolv.conf with error 2 (sysdeps.cpp:715)

In my work we use a Juniper client for the VPN connection. Suddenly, I started getting problems to connect. It was like it was going to connect normally but at the end it was exiting like if I was doing it, showing the message that connection was closed successfully. 

Checking the logs I realized of this error:

ncsvc[p10461.t10461] sysdeps.error Failed to open /etc/resolv.conf with error 2 (sysdeps.cpp:715)

I went to check, and effectively this file  /etc/resolv.conf didn't exist. So I created an empty one (in my case it was a broken symlink). And voilĂ ! Problem solved.