Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push Publishing: Cannot push empty template if DB is Oracle #10828

Closed
joseorsini opened this issue Feb 27, 2017 · 2 comments
Closed

Push Publishing: Cannot push empty template if DB is Oracle #10828

joseorsini opened this issue Feb 27, 2017 · 2 comments

Comments

@joseorsini
Copy link
Contributor

joseorsini commented Feb 27, 2017

Expected Behavior

Whether an Advanced Template has any valid Velocity/HTML code or, it should be pushed to environments after the user requests this action.

Current Behavior

An Advanced Template cannot be pushed between environments if there's no code on its body field.

Possible Solution

Check if body is empty or null, so cases like Oracle where empty strings are stored as null values can be handled better.

Known Workarounds

Insert any piece of Velocity/HTML code on the Template body.

Steps to Reproduce (for bugs)

  1. Start up two nodes of dotCMS 3.7.1 pointing to separate Oracle 11G schemas/users.
  2. Apply an Enterprise License to each node.
  3. Set up Push Publishing configuration so you can push contents between these two servers (please see Push Publishing: Cannot configure "receive from" endpoint if DB is Oracle #10825 for more details on how to do this).
  4. Run the Integrity Checker and solve any potential conflicts between environmetns.
  5. on Sender environment, create an Advanced Template and leave the body field empty. Save/Publish it.
  6. Right click on the recently created Template and Push it to the Receiver environment.

Stacktrace:

[27/02/17 10:10:25:852 EST]  INFO publishing.PublisherAPIImpl: Start of Bundler: DependencyBundler
[27/02/17 10:10:25:868 EST] ERROR publishing.PublisherAPIImpl: null
com.dotcms.publishing.DotBundleException
    at com.dotcms.enterprise.publishing.remote.bundler.DependencyBundler.generate(SourceFile:70) ~[ee-3.7.1.jar:?]
    at com.dotcms.publishing.PublisherAPIImpl.publish(PublisherAPIImpl.java:75) [dotcms_3.7.1_57dc8a6.jar:?]
    at com.dotcms.publishing.PublisherAPIImpl.publish(PublisherAPIImpl.java:16) [dotcms_3.7.1_57dc8a6.jar:?]
    at com.dotcms.publisher.business.PublisherQueueJob.execute(PublisherQueueJob.java:148) [dotcms_3.7.1_57dc8a6.jar:?]
    at org.quartz.core.JobRunShell.run(JobRunShell.java:223) [dot.quartz-all-1.8.6_2.jar:?]
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) [dot.quartz-all-1.8.6_2.jar:?]
Caused by: java.lang.NullPointerException
    at java.util.regex.Matcher.getTextLength(Matcher.java:1283) ~[?:1.8.0_60]
    at java.util.regex.Matcher.reset(Matcher.java:309) ~[?:1.8.0_60]
    at java.util.regex.Matcher.<init>(Matcher.java:229) ~[?:1.8.0_60]
    at java.util.regex.Pattern.matcher(Pattern.java:1093) ~[?:1.8.0_60]
    at com.dotmarketing.portlets.templates.business.TemplateFactoryImpl.getContainerIds(TemplateFactoryImpl.java:384) ~[dotcms_3.7.1_57dc8a6.jar:?]
    at com.dotmarketing.portlets.templates.business.TemplateFactoryImpl.getContainersInTemplate(TemplateFactoryImpl.java:369) ~[dotcms_3.7.1_57dc8a6.jar:?]
    at com.dotmarketing.portlets.templates.business.TemplateAPIImpl.getContainersInTemplate(TemplateAPIImpl.java:312) ~[dotcms_3.7.1_57dc8a6.jar:?]
    at com.dotcms.publisher.util.DependencyManager.setTemplateDependencies(DependencyManager.java:773) ~[dotcms_3.7.1_57dc8a6.jar:?]
    at com.dotcms.publisher.util.DependencyManager.setDependencies(DependencyManager.java:329) ~[dotcms_3.7.1_57dc8a6.jar:?]
    at com.dotcms.enterprise.publishing.remote.bundler.DependencyBundler.generate(SourceFile:67) ~[ee-3.7.1.jar:?]
    ... 5 more
[27/02/17 10:10:25:877 EST] ERROR business.PublisherQueueJob: Unable to publish Bundle: null
com.dotcms.publishing.DotPublishingException
    at com.dotcms.publishing.PublisherAPIImpl.publish(PublisherAPIImpl.java:87) ~[dotcms_3.7.1_57dc8a6.jar:?]
    at com.dotcms.publishing.PublisherAPIImpl.publish(PublisherAPIImpl.java:16) ~[dotcms_3.7.1_57dc8a6.jar:?]
    at com.dotcms.publisher.business.PublisherQueueJob.execute(PublisherQueueJob.java:148) [dotcms_3.7.1_57dc8a6.jar:?]
    at org.quartz.core.JobRunShell.run(JobRunShell.java:223) [dot.quartz-all-1.8.6_2.jar:?]
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) [dot.quartz-all-1.8.6_2.jar:?]
Caused by: com.dotcms.publishing.DotBundleException
    at com.dotcms.enterprise.publishing.remote.bundler.DependencyBundler.generate(SourceFile:70) ~[ee-3.7.1.jar:?]
    at com.dotcms.publishing.PublisherAPIImpl.publish(PublisherAPIImpl.java:75) ~[dotcms_3.7.1_57dc8a6.jar:?]
    ... 4 more
Caused by: java.lang.NullPointerException
    at java.util.regex.Matcher.getTextLength(Matcher.java:1283) ~[?:1.8.0_60]
    at java.util.regex.Matcher.reset(Matcher.java:309) ~[?:1.8.0_60]
    at java.util.regex.Matcher.<init>(Matcher.java:229) ~[?:1.8.0_60]
    at java.util.regex.Pattern.matcher(Pattern.java:1093) ~[?:1.8.0_60]
    at com.dotmarketing.portlets.templates.business.TemplateFactoryImpl.getContainerIds(TemplateFactoryImpl.java:384) ~[dotcms_3.7.1_57dc8a6.jar:?]
    at com.dotmarketing.portlets.templates.business.TemplateFactoryImpl.getContainersInTemplate(TemplateFactoryImpl.java:369) ~[dotcms_3.7.1_57dc8a6.jar:?]
    at com.dotmarketing.portlets.templates.business.TemplateAPIImpl.getContainersInTemplate(TemplateAPIImpl.java:312) ~[dotcms_3.7.1_57dc8a6.jar:?]
    at com.dotcms.publisher.util.DependencyManager.setTemplateDependencies(DependencyManager.java:773) ~[dotcms_3.7.1_57dc8a6.jar:?]
    at com.dotcms.publisher.util.DependencyManager.setDependencies(DependencyManager.java:329) ~[dotcms_3.7.1_57dc8a6.jar:?]
    at com.dotcms.enterprise.publishing.remote.bundler.DependencyBundler.generate(SourceFile:67) ~[ee-3.7.1.jar:?]
    at com.dotcms.publishing.PublisherAPIImpl.publish(PublisherAPIImpl.java:75) ~[dotcms_3.7.1_57dc8a6.jar:?]
    ... 4 more

Context

As a follow-up of #10825, this is related to a set of tests performed on 3.7.x releases under Oracle 11G/12C, as per this Support Ticket: https://my.dotcms.com/tickets/detail.dot?id=78607db5-ef06-4c10-a80d-093a16a7336d

Your Environment

  • dotCMS 3.7.1
  • Google Chrome Browser.
  • macOS Sierra (CMS), Ubuntu 16.04 LTS (Database).
  • Tomcat 8.0.18.
  • Oracle Java JDK 8u60.
  • Oracle 11G Express Edition.
@joseorsini
Copy link
Contributor Author

PR: #10829

dsilvam added a commit that referenced this issue Feb 27, 2017
…late-oracle-dbs

#10828 fix push empty templates in Oracle
@dsilvam dsilvam added this to the Rex Current milestone Feb 27, 2017
@nollymar nollymar self-assigned this Feb 27, 2017
@nollymar
Copy link
Contributor

Tested. Working as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants