Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. The Developer Center continues to support Commerce 6.13.0 through 7.4.1.Visit new site

Developer Troubleshooting

Developer Troubleshooting

Here are some tips and tricks for common issues found when working with the Elastic Path platform.

Eclipse Issues

The following are some common problems that can occur when working with Eclipse.



Multiples errors occur when importing the Commerce Manager Client's projects or when restarting eclipse.

In Eclipse, right-click the project, select Maven, and then Update Project Configuration. mvn clean install the libs-wrapper and test-libs-wrapper projects. Then in Eclipse, Project > Clean and re-build the entire workspace or affected projects.

Cortex API Issues



OpenJPA Exception

org.springframework.beans.factory.BeanCreationException: Error creating bean with name '': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customerService' defined in OSGi resource[bundle://22.0:0/spring/service/service.xml||bnd.sym=dcapi-core-wrapper]: Cannot resolve reference to bean 'customerServiceTarget' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customerServiceTarget' defined in OSGi resource[bundle://22.0:0/spring/service/service.xml||bnd.sym=dcapi-core-wrapper]: Cannot resolve reference to bean 'emailService' while setting bean property 'emailService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'emailService' defined in OSGi resource[bundle://22.0:0/OSGI-INF/blueprint/springCtx-import.xml||bnd.sym=dcapi-core-wrapper]: Invocation of init method failed; nested exception is <openjpa-1.2.1-ep5.0-r61960:103030 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Error extracting class information from "bundle://22.0:-1".

OpenJPA is trying to perform a classpath scan for classes that need to be enhanced for run time. This scan is not permitted by OSGi. To stop this scan from occurring, make sure the extension throwing the error has the following:


Unable to search for items or view items in a navigation:

2012-11-30 12:01:51,874 [http-8080-1] WARN com.elasticpath.dcapi.resources.searches.command.impl.ReadKeywordsFormCommandImpl - Could not get default page size for scope: mobee
2012-11-30 12:01:51,874 [http-8080-1] ERROR com.elasticpath.dcapi.resource.kernel.impl.ResourceKernelImpl - Server failure processing resource operation READ /searches/mobee/keywords/form Ref#-9223372036854775728: Unable to resolve setting value
The COMMERCE/STORE/listPagination setting is not included in your TSETTINGSDEFINITION table. To fix this, insert the following setting into your TSETTINGSDEFINITION table:
COMMERCE/STORE/listPagination 20 Integer The maximum number of list elements per page that the API resource will return for paginated objects.
After a request, Cortex API doesn't respond. You may have seen a "Please double check your URI, there was no response." message. This indicates that you have not yet accepted your Cortex API's SSL certificate. With a browser, access your Cortex API server (https://localhost:8443/dcapi) and accept the SSL certificate, then try your request again.

Issue with the itest-fixtures project

Plugin execution not covered by lifecycle configuration: org.codehaus.gmaven:gmaven-plugin:1.4:compile
Plugin execution not covered by lifecycle configuration: org.codehaus.gmaven:gmaven-plugin:1.4:generateStubs
Plugin execution not covered by lifecycle configuration: org.codehaus.gmaven:gmaven-plugin:1.4:generateTestStubs
Plugin execution not covered by lifecycle configuration: org.codehaus.gmaven:gmaven-plugin:1.4:testCompile
This issue is covered in this GREP discussion:

Maven Command Line Issues



Maven Out of PermGen space

Give Maven more memory: Set your Maven environment variable: MAVEN_OPTS='-Xmx1024m -XX:MaxPermSize=512m'

Build Troubleshooting

The following are some common problems that can occur when building the Elastic Path code and how to correct them.



[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>>
[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<<
[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Interactive mode
[WARNING] Archetype not found in any catalog. Falling back to central repository (
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project sta
ndalone-pom: The desired archetype does not exist (com.elasticpath.cortex.dce:ep-cortex-dce-resource-configuration-arche
type:0.1.0-SNAPSHOT) -> [Help 1]

The most probable cause is the wrong archetype version number was used in the Maven command. Be aware the documentation provides example archetype versions only. The archetype versions your company uses will be unique and will differ from the one used in the documentation.

To see a list of the archetypes installed on your computer see: C:\users\<username>\.m2\archetype-catalog.xml

Syntax error on token "}", ;expectedSyntax error on token "break",;expectedSyntax error, insert "}" to complete MethodBodySyntax error, insert "}" to complete ObjectLiteral...

Eclipse is complaining about malformed JavaScript in the ep-dcapi-rawe project; however, this is valid JavaScript and the Cortex Studio project will run properly with it. You can turn these warnings off for the ep-dcapi-rawe project. From Eclipse's Problems View drop-down menu, select Configure Contents. Then in the Types box, deselect JavaScript Problems. For more information on this dialog box, see
null(org.codehause.mojo:jaxws-maven-plugin:1.12:wsimport:default:generate-sources) The ep-geoip-quova project wsdl files are note being pulled down and built properly. You may need to delete the package in target/generated-sources/jaxws and then clean and build the project again through Eclipse.
The following artifacts could not be
resolved: com.elasticpath.osgi.wrappers:

Maven cannot find the OSGi JARs required to build the Commerce Manager Client and Cortex API. You may need to install the artifacts to your repository. You can either:

  • Uncomment the with-osgi-wrappers profile in your settings.xml file and rerun the command you were attempting.
  • In the command line, navigate to <EP_SOURCE\osgi-wrappersand run the following command
    mvn install

OpenJPA exception, NoClassDefFoundError, displays on various domain tag classes:

[openjpac] java.lang.IllegalArgumentException: java.lang.NoClassDefFoundError:

If you are on a Linux machine, Linux limits the number of open socket connections. Each open file is considered an open connection. You may need to increase the number of open socket connections on your Linux machine. A detailed description of how to do this can be found here:

Eclipse shows OpenJPA exceptions in ep-core and NoClassDefFoundErrors when building

Check there are no bin folders in your projects (except the bin folders ep-search-webapp and tests are OK). If bin folders exist in your projects, delete them and rebuild your projects in Eclipse. You do not need these folders and Eclipse treats them as special folders and tries to enhance the classes within them, which will cause failures.

Build fails due to access restriction:

Access restriction: The type PlanarImage is not accessible due to restriction
on required library /usr/lib/jvm/java-6-sun-

This may be caused by an access restriction to your JDK. Removing the JDK library from Eclipse, adding the JDK library back to Eclipse, and then cleaning and rebuilding your projects may fix this issue. This issue has been experienced by other users, see

Building Application Assets fails:

[ERROR] Failed to execute goal 
(add-links-to-assets-dir) on project application-assets: Can't create junction source 
[C:\ep\ep-assets\application-assets\src\main\assets\cmassets] -> 
[C:\Documents and Settings\admin\ep-assets\cmassets]

If you are on an older version of Windows, you will need to install Junction. Junction is required by the ep-symlinks-plugin to generate symbolic links.

Building fails on license issue:

[INFO] — licensing-maven-plugin:1.6:check (enforce-third-party-licensing) @ snapitup-populate-database —
[WARNING] Licensing: The artifact has no license specified.
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17:36.405s
[INFO] Finished at: Thu Mar 08 11:48:54 GMT 2012
[INFO] Final Memory: 24M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.linuxstuff.maven:licensing-maven-plugin:1.6:check (enforce-third-party-licensing) on project snapitup-populate-database: This project has 1 artifact missing licensing information. -> [Help 1]

This issue is likely caused by a licensing issue in the library dependency. The stax-api library in either your local .m2 repository or in your Nexus is missing the license information in the POM.xml:

           <name>GNU General Public Library</name>

If your Nexus has the proper license in the stax-api POM, delete the stax-api from your local .m2 repository and rebuild. This will download the correct POM from your Nexus to your local .m2 repository.

If you don't have a Nexus, include the license block shown above into your local .m2 repository's stax-api-VERSIONNUMBER.pom.

Building the platform fails on missing com.elasticpath:ep-bnd-plugins:jar:1.0-SNAPSHOT

The project com.elasticpath.dcapi.integration:ep-dcapi-core-wrapper-epcommerce:
has 2 errors

Unresolveable build extension: Plugin
org.apache.felix:maven-bundle-plugin:2.3.6 or one of its dependencies could not
be resolved: Failure to find com.elasticpath:ep-bnd-plugins:jar:1.0-SNAPSHOT in
was cached in the local repository, resolution will not be reattempted until
the update interval of apache.snapshots has elapsed or updates are forced ->
The ep-dcapi-core-wrapper-epcommerce/pom.xml is referencing an invalid snapshot version of a plugin. Update the POM to reference the correct plugin version as shown below:
Table 1.
Before After

Startup Troubleshooting

The following are some common problems that can occur when starting up the Storefront, CM Server, Commerce Manager, and Search server.



The web applications fail to launch. The logs contain messages similar to the following:

Invocation of init method failed; nested exception is
<openjpa-1.2.1-r62037:76497M fatal general error>
Cannot load JDBC driver class 'com.mysql.jdbc.Driver'

The JDBC driver library is not on the class path. If you're running the web apps in Tomcat 6, copy the JDBC library for your database to Tomcat's lib directory.

The web applications fail to launch. The logs contain messages similar to the following:

<openjpa-1.2.1-ep5.0-r61960:103030 fatal general error>
org.apache.openjpa.persistence.PersistenceException: Cannot create JDBC driver
of class '' for connect URL 'null' at

The JDBC configuration could not be found for your context path.

In Tomcat, this may occur when you miss including the opening slash on the path. For example, in your server.xml you have Context path = "storefront" instead of Context path = "/storefront".


You may have missed setting up your Tomcat's context.xml file. For more information, see Configure the Tomcat's context.xml

The web applications fail to launch. The logs contain messages similar to the following:

ERROR main 2012-05-28 19:25:16,625
- Context initialization failed org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Failed to import bean definitions from URL location

This occurs when you import just the children projects. Make sure you import the parent project into Eclipse.

For example, to import the Commerce Manager server, import the cmserver folder instead of the children ep-cmserver and ep-cmserver-webapp directories.

When launching the server from within Eclipse (using WTP), the server fails to start and the Problem Occurred dialog appears. Clicking the Details button displays the following message:Server Tomcat v6.0 Server at localhost was unable to start within 30 seconds. If the server requires more time, try increasing the timeout in the server editor.

This can occur because the server start timeout is too short. Increase the start timeout to at least 180 seconds.

The web applications fail to start, or they start but shut down after a short time. One or more of the logs contain messages similar to the following:

java.lang.OutOfMemoryError: PermGen space
java.lang.OutOfMemoryError: Java heap space

The application server memory configuration is incorrect. Make sure the application server is launched with the following parameters:

-Xmx1024m -XX:MaxPermSize=512m

The web applications start, but opening the storefront URL in a browser displays a blank page. The storefront log contains messages similar to the following:

INFO com.elasticpath.sfweb.filters.StoreSelectionFilter
- Unable to find store code from any selection

The hostname you are using does not match any of the storefront URLs. If you're testing in your personal development environment, make sure you've configured your etc/hosts to correctly map the hostname you are using to the one configured for the store in the Commerce Manager client. To verify in the CM client, go to Activity -> Configuration -> Stores and locate the store. Make sure the hostname in the Store URL setting matches the hostname in the URL you are using.

The web applications start and the storefront is displayed, but product images are not displayed.

The directory containing product images may be missing from your assets directory. Verify the assets-related settings in the CM client's system configuration settings.

The web applications start and the storefront's homepage displays, but categories seem to be empty. Clicking a direct link to a product displays its details but searching and browsing don't produce any results.

The search indexes were not built. If this is the first time starting Elastic Path Commerce, you may need to wait a few minutes for search index building to complete. Otherwise, you can schedule search index builds from within the CM client; go to Activity -> Configuration -> Search Indexes. In the list of search indexes, select each index you want to build and click Rebuild Index.

The JVM stops responding and displays this error message:

# A fatal error has been detected by the Java Runtime Environment:
# java.lang.OutOfMemoryError: requested 8589934608 bytes for Chunk::new. Out of swap space?
#  Internal Error (allocation.cpp:215), pid=23008, tid=1099946304
#  Error: Chunk::new

This is a known Java bug. You can fix this issue by adding the following JVM parameter:-XX:CompileCommand=exclude,org/apache/velocity/runtime/directive/Foreach,render

The web apps fail on start up with a similar message:
target\logs\elasticpath-connect.log (The system cannot find the path specified)
Starting the web applications in Eclipse writes the log files to a relative location. In this case, the relative location is causing an error. Try setting the log files to write to an absolute path following the directions here: Logging.