WiX project :- how to reduce EXE(Bootstapper) size - winforms

hi I have two MSI one for 86 bit and one for 64 bit and each MSI size is 60 MB so i want to create exe(Bootstrapper) with both MSI's with exe size 60-70 MB .
Issue:- Currently my exe(Bootstrapper ) size is 120 MB i want to reduce this to 60-70 MB with both Msi's
MY CODE
In Bootstrapper
<Chain>
<PackageGroupRef Id="NetFx451Web"/>
<ExePackage SourceFile="vstor_redist.exe" Vital="yes" Cache="yes" Compressed="no" Permanent="yes"
InstallCommand="/q /norestart"
RepairCommand="/q /norestart"
UninstallCommand="/q /norestart"
DetectCondition="VSTOR40"
/>
<ExePackage SourceFile="vcredist_x86.exe" Vital="yes" Cache="yes" Compressed="no" Permanent="yes"
DownloadUrl="http://downloads.mangoapps.com/pre/win/vcredist_x86.exe"
InstallCommand="/q /norestart"
RepairCommand="/q /norestart"
UninstallCommand="/q /norestart"
DetectCondition="VCREDIST2012"
/>
<MsiPackage Id="MSI64" SourceFile="$(var.WixMFW_PerMachine.ProjectDir)bin\64\Release\MFWSetup_x64.msi" InstallCondition="(VersionNT64)" DisplayInternalUI="no">
<MsiProperty Name="INSTALLFOLDER" Value="[InstallFolder]"/>
</MsiPackage>
<MsiPackage Id="MSI86" SourceFile="$(var.WixMFW_PerMachine.ProjectDir)bin\86\Release\MFWSetup_x86.msi" InstallCondition="(NOT VersionNT64)" DisplayInternalUI="no">
<MsiProperty Name="INSTALLFOLDER" Value="[InstallFolder]"/>
</MsiPackage>
</Chain>
IN MSI
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Product Id="*" Name="Demo $(var.bitness)" Language="1033" Version="$(var.SetupVersionNumber)" Manufacturer="Demo " UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<CustomAction Id="DIRCA_TARGETDIR" Property="TARGETDIR" Value="[LocalAppDataFolder][Manufacturer]\[ProductName]" Execute="firstSequence" />
<MajorUpgrade DowngradeErrorMessage="A newer version of Demo For Windows is already installed." />
<Upgrade Id="$(var.UpgradeCode)">
<UpgradeVersion Maximum="$(var.SetupVersionNumber)" Property="OLDPRODUCTFOUND" OnlyDetect="no" IncludeMinimum="yes" IncludeMaximum="no" Language="1033" />
<UpgradeVersion Minimum="$(var.SetupVersionNumber)" Property="NEWPRODUCTFOUND" OnlyDetect="yes" IncludeMinimum="no" Language="1033" />
</Upgrade>
<?if $(var.Configuration) = ReleaseMSI ?>
<Media Id="1" Cabinet="Cab1.cab" EmbedCab="yes"></Media>
<?if $(var.Platform) = x64 ?>
<Media Id="2" Cabinet="Cab2.cab" EmbedCab="yes"></Media>
<?else ?>
<Media Id="3" Cabinet="Cab3.cab" EmbedCab="yes"></Media>
<?endif ?>
<?else?>
<Media Id="1" Cabinet="Cab1.cab" EmbedCab="no"></Media>
<?if $(var.Platform) = x64 ?>
<Media Id="2" Cabinet="Cab2.cab" EmbedCab="no"></Media>
<?else ?>
<Media Id="3" Cabinet="Cab3.cab" EmbedCab="no"></Media>
<?endif ?>
<?endif ?>
Feature
Directory
Component example
--
<Component Id="comp_F7B6C4FB_A2AD_493C_8081_8DAC3298503B" Guid="156DA224-3EC3-490C-8BE4-192E93883F44" Permanent="no" SharedDllRefCount="no" Transitive="no" Win64="$(var.Win64)" >
<File Id="_93649A69_3915_4B81_B0CB_B0AB2807E6E6" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="CefSharp.dll" Source="..\Utility\externalReferences\CefSharp.dll" KeyPath="yes" />
</Component>
---
Registrys
</Fragment>
</Wix>
But this is not working .. please help me.
All Files are comman in both x86 and x64 MSI the only different is
<?if $(var.Platform) = x64 ?>
<Component Id="SQLite" Win64="$(var.Win64)">
<File Id="SQLite.Interop" Source="$(var.ExternalReferences)\x64\SQLite.Interop.dll" KeyPath="yes" DiskId="2"/>
</Component>
<Component Id="System.Data.SQLitecomp" Win64="$(var.Win64)">
<File Id="System.Data.SQLite" Source="$(var.ExternalReferences)\x64\System.Data.SQLite.dll" KeyPath="yes" DiskId="2"/>
</Component>
<?else ?>
<Component Id="SQLite86" Win64="$(var.Win64)">
<File Id="SQLite.Interop" Source="$(var.ExternalReferences)\x86\SQLite.Interop.dll" KeyPath="yes" DiskId="3"/>
</Component>
<Component Id="System.Data.SQLitecomp" Win64="$(var.Win64)">
<File Id="System.Data.SQLite" Source="$(var.ExternalReferences)\x86\System.Data.SQLite.dll" KeyPath="yes" DiskId="3"/>
</Component>

Suggest creating three MSIs:
A common files MSI installing all of the common files to a platform
independent location such as CommonAppDataFolder.
A x64 platform MSI installing the 64 bit SQLLite files.
A x86 platform MSI installing the 32 bit SQLLite files.
You can then change your Bootstrapper to always install MSI #1 and either MSI #2 or MSI #3 depending on the platform. Because the common files are no longer duplicated, this should reduce the overall size of your Bootstrapper.
<Chain>
<PackageGroupRef Id="NetFx451Web"/>
<ExePackage SourceFile="vstor_redist.exe" Vital="yes" Cache="yes" Compressed="no" Permanent="yes"
InstallCommand="/q /norestart"
RepairCommand="/q /norestart"
UninstallCommand="/q /norestart"
DetectCondition="VSTOR40"
/>
<ExePackage SourceFile="vcredist_x86.exe" Vital="yes" Cache="yes" Compressed="no" Permanent="yes"
DownloadUrl="http://downloads.mangoapps.com/pre/win/vcredist_x86.exe"
InstallCommand="/q /norestart"
RepairCommand="/q /norestart"
UninstallCommand="/q /norestart"
DetectCondition="VCREDIST2012"
/>
<MsiPackage Id="MSICommon" SourceFile="$(var.WixMFW_PerMachine.ProjectDir)bin\Release\MFWSetup_common.msi" DisplayInternalUI="no">
<MsiProperty Name="INSTALLFOLDER" Value="[InstallFolder]"/>
</MsiPackage>
<MsiPackage Id="MSI64" SourceFile="$(var.WixMFW_PerMachine.ProjectDir)bin\64\Release\MFWSetup_x64.msi" InstallCondition="(VersionNT64)" DisplayInternalUI="no">
<MsiProperty Name="INSTALLFOLDER" Value="[InstallFolder]"/>
</MsiPackage>
<MsiPackage Id="MSI86" SourceFile="$(var.WixMFW_PerMachine.ProjectDir)bin\86\Release\MFWSetup_x86.msi" InstallCondition="(NOT VersionNT64)" DisplayInternalUI="no">
<MsiProperty Name="INSTALLFOLDER" Value="[InstallFolder]"/>
</MsiPackage>
</Chain>

Related

Position Outlook Add-In button on the `AppointmentOrganizerCommandSurface`

I am trying to add a button to the AppointmentOrganizerCommandSurface in Outlook just like Giphy is added in this image, but instead, my My Office Add-in is added to the menu.
I would like to add an action button with my custom icon next to the Giphy action.
I tried manipulating manifest.xml. I went through the documentation and followed the steps, but I was unable to figure out what is going on.
Here is the manifest:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" xsi:type="MailApp">
<Id>61262617-dad8-4e84-a9e4-89b1bab3e6e7</Id>
<Version>1.0.0.0</Version>
<ProviderName>Contoso</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="My Office Add-In"/>
<Description DefaultValue="A template to get started."/>
<IconUrl DefaultValue="https://localhost:3000/assets/icon-64.png"/>
<HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/icon-128.png"/>
<SupportUrl DefaultValue="https://www.contoso.com/help"/>
<AppDomains>
<AppDomain>https://www.contoso.com</AppDomain>
</AppDomains>
<Hosts>
<Host Name="Mailbox"/>
</Hosts>
<Requirements>
<Sets>
<Set Name="Mailbox" MinVersion="1.1"/>
</Sets>
</Requirements>
<FormSettings>
<Form xsi:type="ItemRead">
<DesktopSettings>
<SourceLocation DefaultValue="https://localhost:3000/taskpane.html"/>
<RequestedHeight>250</RequestedHeight>
</DesktopSettings>
</Form>
</FormSettings>
<Permissions>ReadWriteItem</Permissions>
<Rule xsi:type="RuleCollection" Mode="Or">
<Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/>
</Rule>
<DisableEntityHighlighting>false</DisableEntityHighlighting>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
<Requirements>
<bt:Sets DefaultMinVersion="1.3">
<bt:Set Name="Mailbox"/>
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<FunctionFile resid="Commands.Url"/>
<ExtensionPoint xsi:type="AppointmentOrganizerCommandSurface">
<OfficeTab id="TabDefault">
<Group id="msgReadGroup">
<Label resid="GroupLabel"/>
<Control xsi:type="Button" id="msgReadOpenPaneButton">
<Label resid="TaskpaneButton.Label"/>
<Supertip>
<Title resid="TaskpaneButton.Label"/>
<Description resid="TaskpaneButton.Tooltip"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="Taskpane.Url"/>
</Action>
</Control>
<Control xsi:type="Button" id="ActionButton">
<Label resid="ActionButton.Label"/>
<Supertip>
<Title resid="ActionButton.Label"/>
<Description resid="ActionButton.Tooltip"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>action</FunctionName>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16" DefaultValue="https://localhost:3000/assets/icon-16.png"/>
<bt:Image id="Icon.32x32" DefaultValue="https://localhost:3000/assets/icon-32.png"/>
<bt:Image id="Icon.80x80" DefaultValue="https://localhost:3000/assets/icon-80.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="Commands.Url" DefaultValue="https://localhost:3000/commands.html"/>
<bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3000/taskpane.html"/>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="GroupLabel" DefaultValue="Contoso Add-in"/>
<bt:String id="TaskpaneButton.Label" DefaultValue="Show Taskpane"/>
<bt:String id="ActionButton.Label" DefaultValue="Perform an action"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="TaskpaneButton.Tooltip" DefaultValue="Opens a pane displaying all available properties."/>
<bt:String id="ActionButton.Tooltip" DefaultValue="Perform an action when clicked."/>
</bt:LongStrings>
</Resources>
</VersionOverrides>
</OfficeApp>
Thank you in advance.
You need to pin your add-in in the outlook to acheive the same.
You can pin an add-in so it's easily available when you're composing an email message.
Select Settings> View all Outlook settings > Mail > Customize actions.
Select the check box for the add-in that you want to see when you’re composing a message.

JBoss-database connectivity losts after 5 mins though procedure was executing in background, results in error

We have 2 environments, where we are calling one procedure from JSP page. I'm getting proper result in one environment after 7 mins as procedure execution time is 7 mins. But in another environment after 5 mins JBoss-database connectivity lost and results in error on JSP.
We are using JBoss EAP domain mode. Kindly provide solution.
Thanks.
Find below domain.xml content :
<?xml version='1.0' encoding='UTF-8'?> <domain xmlns="urn:jboss:domain:1.5"> <extensions> <extension module="org.jboss.as.clustering.infinispan"/> <extension module="org.jboss.as.clustering.jgroups"/> <extension module="org.jboss.as.cmp"/> <extension module="org.jboss.as.configadmin"/> <extension module="org.jboss.as.connector"/> <extension module="org.jboss.as.ee"/> <extension module="org.jboss.as.ejb3"/> <extension module="org.jboss.as.jacorb"/> <extension module="org.jboss.as.jaxr"/> <extension module="org.jboss.as.jaxrs"/> <extension module="org.jboss.as.jdr"/> <extension module="org.jboss.as.jmx"/> <extension module="org.jboss.as.jpa"/> <extension module="org.jboss.as.jsf"/> <extension module="org.jboss.as.jsr77"/> <extension module="org.jboss.as.logging"/> <extension module="org.jboss.as.mail"/> <extension module="org.jboss.as.messaging"/> <extension module="org.jboss.as.modcluster"/> <extension module="org.jboss.as.naming"/> <extension module="org.jboss.as.pojo"/> <extension module="org.jboss.as.remoting"/> <extension module="org.jboss.as.sar"/> <extension module="org.jboss.as.security"/> <extension module="org.jboss.as.threads"/> <extension module="org.jboss.as.transactions"/> <extension module="org.jboss.as.web"/> <extension module="org.jboss.as.webservices"/> <extension module="org.jboss.as.weld"/> </extensions> <system-properties> <property name="java.net.preferIPv4Stack" value="true"/> <property name="jboss.modules.system.pkgs" value="com.singularity"/> </system-properties> <paths> <path name="LOG_PATH" path="E:\Apps\RedHat\Logs\Host01\${jboss.server.name}"/> </paths> <management> <access-control provider="simple"> <role-mapping> <role name="SuperUser"> <include> <user name="$local"/> </include> </role> </role-mapping> </access-control> </management> <profiles> <profile name="full-ha"> <subsystem xmlns="urn:jboss:domain:logging:1.3"> <console-handler name="CONSOLE"> <level name="INFO"/> <formatter> <pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/> </formatter> </console-handler> <file-handler name="TransActionLog" autoflush="true"> <level name="DEBUG"/> <file relative-to="LOG_PATH" path="transactions.log"/> <append value="true"/> </file-handler> <size-rotating-file-handler name="FILE" autoflush="true"> <level name="CONFIG"/> <formatter> <pattern-formatter pattern="%d{MM/dd/yyyy HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/> </formatter> <file relative-to="LOG_PATH" path="server.log"/> <rotate-size value="50m"/> <max-backup-index value="30"/> <append value="true"/> </size-rotating-file-handler> <logger category="org.jboss.jca.core.connectionmanager"> <level name="TRACE"/> </logger> <logger category="com.arjuna" use-parent-handlers="false"> <level name="DEBUG"/> <handlers> <handler name="TransActionLog"/> </handlers> </logger> <logger category="org.apache.tomcat.util.modeler"> <level name="WARN"/> </logger> <logger category="org.jboss.as.config"> <level name="TRACE"/> </logger> <logger category="sun.rmi"> <level name="WARN"/> </logger> <logger category="jacorb"> <level name="WARN"/> </logger> <logger category="jacorb.config"> <level name="ERROR"/> </logger> <root-logger> <level name="INFO"/> <handlers> <handler name="CONSOLE"/> <handler name="FILE"/> </handlers> </root-logger> </subsystem> <subsystem xmlns="urn:jboss:domain:cmp:1.1"/> <subsystem xmlns="urn:jboss:domain:configadmin:1.0"/> <subsystem xmlns="urn:jboss:domain:datasources:1.1"> <datasources> <datasource jta="false" jndi-name="java:/omnicab" pool-name="omnicab" enabled="true" use-ccm="false"> <connection-url>jdbc:sqlserver://162.123.118.185:1433;databaseName=omnicab</connection-url> <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class> <driver>sqljdbc4.jar</driver> <pool> <min-pool-size>30</min-pool-size> <max-pool-size>500</max-pool-size> <prefill>true</prefill> <use-strict-min>false</use-strict-min> <flush-strategy>FailingConnectionOnly</flush-strategy> </pool> <security> <user-name>OmniUserMO</user-name> <password>WrUthus4</password> </security> <validation> <validate-on-match>true</validate-on-match> <background-validation>false</background-validation> </validation> <timeout> <blocking-timeout-millis>30000</blocking-timeout-millis> <idle-timeout-minutes>2</idle-timeout-minutes> </timeout> <statement> <share-prepared-statements>false</share-prepared-statements> </statement> </datasource> <drivers> <driver name="h2" module="com.h2database.h2"> <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class> </driver> </drivers> </datasources> </subsystem> <subsystem xmlns="urn:jboss:domain:ee:1.1"> <global-modules> <module name="omnidocs_library" slot="main"/> <module name="org.jboss.remote-naming" slot="main"/> </global-modules> <spec-descriptor-property-replacement>false</spec-descriptor-property-replacement> <jboss-descriptor-property-replacement>true</jboss-descriptor-property-replacement> </subsystem> <subsystem xmlns="urn:jboss:domain:ejb3:1.4"> <session-bean> <stateless> <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/> </stateless> <stateful default-access-timeout="5000" cache-ref="simple" clustered-cache-ref="clustered"/> <singleton default-access-timeout="5000"/> </session-bean> <mdb> <resource-adapter-ref resource-adapter-name="${ejb.resource-adapter-name:hornetq-ra}"/> <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/> </mdb> <pools> <bean-instance-pools> <strict-max-pool name="slsb-strict-max-pool" max-pool-size="100" instance-acquisition-timeout="10" instance-acquisition-timeout-unit="MINUTES"/> <strict-max-pool name="mdb-strict-max-pool" max-pool-size="100" instance-acquisition-timeout="10" instance-acquisition-timeout-unit="MINUTES"/> </bean-instance-pools> </pools> <caches> <cache name="simple" aliases="NoPassivationCache"/> <cache name="passivating" passivation-store-ref="file" aliases="SimpleStatefulCache"/> <cache name="clustered" passivation-store-ref="infinispan" aliases="StatefulTreeCache"/> </caches> <passivation-stores> <file-passivation-store name="file"/> <cluster-passivation-store name="infinispan" cache-container="ejb"/> </passivation-stores> <async thread-pool-name="default"/> <timer-service thread-pool-name="default"> <data-store path="timer-service-data" relative-to="jboss.server.data.dir"/> </timer-service> <remote connector-ref="remoting-connector" thread-pool-name="default"/> <thread-pools> <thread-pool name="default"> <max-threads count="10"/> <keepalive-time time="100" unit="milliseconds"/> </thread-pool> </thread-pools> <iiop enable-by-default="false" use-qualified-name="false"/> <default-security-domain value="other"/> <default-missing-method-permissions-deny-access value="true"/> </subsystem> <subsystem xmlns="urn:jboss:domain:infinispan:1.4"> <cache-container name="singleton" aliases="cluster ha-partition" default-cache="default"> <transport lock-timeout="60000"/> <replicated-cache name="default" mode="SYNC" batching="true"> <locking isolation="REPEATABLE_READ"/> </replicated-cache> </cache-container> <cache-container name="web" aliases="standard-session-cache" default-cache="repl" module="org.jboss.as.clustering.web.infinispan"> <transport lock-timeout="60000"/> <replicated-cache name="repl" mode="ASYNC" batching="true"> <file-store/> </replicated-cache> <replicated-cache name="sso" mode="SYNC" batching="true"/> <distributed-cache name="dist" l1-lifespan="0" mode="ASYNC" batching="true"> <file-store/> </distributed-cache> </cache-container> <cache-container name="ejb" aliases="sfsb sfsb-cache" default-cache="repl" module="org.jboss.as.clustering.ejb3.infinispan"> <transport lock-timeout="60000"/> <replicated-cache name="repl" mode="ASYNC" batching="true"> <eviction strategy="LRU" max-entries="10000"/> <file-store/> </replicated-cache> <replicated-cache name="remote-connector-client-mappings" mode="SYNC" batching="true"/> <distributed-cache name="dist" l1-lifespan="0" mode="ASYNC" batching="true"> <eviction strategy="LRU" max-entries="10000"/> <file-store/> </distributed-cache> </cache-container> <cache-container name="hibernate" default-cache="local-query" module="org.jboss.as.jpa.hibernate:4"> <transport lock-timeout="60000"/> <local-cache name="local-query"> <transaction mode="NONE"/> <eviction strategy="LRU" max-entries="10000"/> <expiration max-idle="100000"/> </local-cache> <invalidation-cache name="entity" mode="SYNC"> <transaction mode="NON_XA"/> <eviction strategy="LRU" max-entries="10000"/> <expiration max-idle="100000"/> </invalidation-cache> <replicated-cache name="timestamps" mode="ASYNC"> <transaction mode="NONE"/> <eviction strategy="NONE"/> </replicated-cache> </cache-container> </subsystem> <subsystem xmlns="urn:jboss:domain:jacorb:1.3"> <orb socket-binding="jacorb" ssl-socket-binding="jacorb-ssl"> <initializers security="identity" transactions="spec"/> </orb> </subsystem> <subsystem xmlns="urn:jboss:domain:jaxr:1.1"> <connection-factory jndi-name="java:jboss/jaxr/ConnectionFactory"/> </subsystem> <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/> <subsystem xmlns="urn:jboss:domain:jca:1.1"> <archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/> <bean-validation enabled="true"/> <default-workmanager> <short-running-threads> <core-threads count="50"/> <queue-length count="50"/> <max-threads count="50"/> <keepalive-time time="10" unit="seconds"/> </short-running-threads> <long-running-threads> <core-threads count="50"/> <queue-length count="50"/> <max-threads count="50"/> <keepalive-time time="10" unit="seconds"/> </long-running-threads> </default-workmanager> <cached-connection-manager/> </subsystem> <subsystem xmlns="urn:jboss:domain:jdr:1.0"/> <subsystem xmlns="urn:jboss:domain:jgroups:1.1" default-stack="udp"> <stack name="udp"> <transport type="UDP" socket-binding="jgroups-udp"/> <protocol type="PING"/> <protocol type="MERGE3"/> <protocol type="FD_SOCK" socket-binding="jgroups-udp-fd"/> <protocol type="FD"/> <protocol type="VERIFY_SUSPECT"/> <protocol type="pbcast.NAKACK"/> <protocol type="UNICAST2"/> <protocol type="pbcast.STABLE"/> <protocol type="pbcast.GMS"/> <protocol type="UFC"/> <protocol type="MFC"/> <protocol type="FRAG2"/> <protocol type="RSVP"/> </stack> <stack name="tcp"> <transport type="TCP" socket-binding="jgroups-tcp"/> <protocol type="TCPPING" socket-binding="jgroups-tcp"> <property name="initial_hosts"> ${jboss.cluster.tcp.initial_hosts} </property> <property name="timeout"> 2000 </property> </protocol> <protocol type="MERGE2"/> <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/> <protocol type="FD"/> <protocol type="VERIFY_SUSPECT"/> <protocol type="pbcast.NAKACK"/> <protocol type="UNICAST2"/> <protocol type="pbcast.STABLE"/> <protocol type="pbcast.GMS"/> <protocol type="UFC"/> <protocol type="MFC"/> <protocol type="FRAG2"/> <protocol type="RSVP"/> </stack> </subsystem> <subsystem xmlns="urn:jboss:domain:jmx:1.3"> <expose-resolved-model/> <expose-expression-model/> <remoting-connector use-management-endpoint="false"/> </subsystem> <subsystem xmlns="urn:jboss:domain:jpa:1.1"> <jpa default-datasource="" default-extended-persistence-inheritance="DEEP"/> </subsystem> <subsystem xmlns="urn:jboss:domain:jsf:1.0"/> <subsystem xmlns="urn:jboss:domain:jsr77:1.0"/> <subsystem xmlns="urn:jboss:domain:mail:1.1"> <mail-session jndi-name="java:jboss/mail/Default"> <smtp-server outbound-socket-binding-ref="mail-smtp"/> </mail-session> </subsystem> <subsystem xmlns="urn:jboss:domain:messaging:1.4"> <hornetq-server> <persistence-enabled>true</persistence-enabled> <security-enabled>false</security-enabled> <journal-type>NIO</journal-type> <journal-min-files>2</journal-min-files> <connectors> <netty-connector name="netty" socket-binding="messaging"/> <netty-connector name="netty-throughput" socket-binding="messaging-throughput"> <param key="batch-delay" value="50"/> </netty-connector> <in-vm-connector name="in-vm" server-id="0"/> </connectors> <acceptors> <netty-acceptor name="netty" socket-binding="messaging"/> <netty-acceptor name="netty-throughput" socket-binding="messaging-throughput"> <param key="batch-delay" value="50"/> <param key="direct-deliver" value="false"/> </netty-acceptor> <in-vm-acceptor name="in-vm" server-id="0"/> </acceptors> <broadcast-groups> <broadcast-group name="bg-group1"> <jgroups-stack>tcp</jgroups-stack> <broadcast-period>5000</broadcast-period> <connector-ref> netty </connector-ref> </broadcast-group> </broadcast-groups> <discovery-groups> <discovery-group name="dg-group1"> <jgroups-stack>tcp</jgroups-stack> <refresh-timeout>10000</refresh-timeout> </discovery-group> </discovery-groups> <cluster-connections> <cluster-connection name="my-cluster"> <address>jms</address> <connector-ref>netty</connector-ref> <discovery-group-ref discovery-group-name="dg-group1"/> </cluster-connection> </cluster-connections> <security-settings> <security-setting match="#"> <permission type="send" roles="guest"/> <permission type="consume" roles="guest"/> <permission type="createNonDurableQueue" roles="guest"/> <permission type="deleteNonDurableQueue" roles="guest"/> </security-setting> </security-settings> <address-settings> <address-setting match="#"> <dead-letter-address>jms.queue.DLQ</dead-letter-address> <expiry-address>jms.queue.ExpiryQueue</expiry-address> <redelivery-delay>0</redelivery-delay> <max-size-bytes>10485760</max-size-bytes> <page-size-bytes>2097152</page-size-bytes> <address-full-policy>PAGE</address-full-policy> <message-counter-history-day-limit>10</message-counter-history-day-limit> <redistribution-delay>1000</redistribution-delay> </address-setting> </address-settings> <jms-connection-factories> <connection-factory name="InVmConnectionFactory"> <connectors> <connector-ref connector-name="in-vm"/> </connectors> <entries> <entry name="java:/ConnectionFactory"/> </entries> </connection-factory> <connection-factory name="RemoteConnectionFactory"> <connectors> <connector-ref connector-name="netty"/> </connectors> <entries> <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/> </entries> <ha>true</ha> <block-on-acknowledge>true</block-on-acknowledge> <retry-interval>1000</retry-interval> <retry-interval-multiplier>1.0</retry-interval-multiplier> <reconnect-attempts>-1</reconnect-attempts> </connection-factory> <pooled-connection-factory name="hornetq-ra"> <transaction mode="xa"/> <connectors> <connector-ref connector-name="in-vm"/> </connectors> <entries> <entry name="java:/JmsXA"/> </entries> </pooled-connection-factory> </jms-connection-factories> </hornetq-server> </subsystem> <subsystem xmlns="urn:jboss:domain:modcluster:1.1"> <mod-cluster-config advertise-socket="modcluster" connector="ajp"> <dynamic-load-provider> <load-metric type="busyness"/> </dynamic-load-provider> </mod-cluster-config> </subsystem> <subsystem xmlns="urn:jboss:domain:naming:1.4"> <remote-naming/> </subsystem> <subsystem xmlns="urn:jboss:domain:pojo:1.0"/> <subsystem xmlns="urn:jboss:domain:remoting:1.1"> <connector name="remoting-connector" socket-binding="remoting" security-realm="ApplicationRealm"/> </subsystem> <subsystem xmlns="urn:jboss:domain:resource-adapters:1.1"/> <subsystem xmlns="urn:jboss:domain:sar:1.0"/> <subsystem xmlns="urn:jboss:domain:security:1.2"> <security-domains> <security-domain name="other" cache-type="default"> <authentication> <login-module code="Remoting" flag="optional"> <module-option name="password-stacking" value="useFirstPass"/> </login-module> <login-module code="RealmDirect" flag="required"> <module-option name="password-stacking" value="useFirstPass"/> </login-module> </authentication> </security-domain> <security-domain name="jboss-web-policy" cache-type="default"> <authorization> <policy-module code="Delegating" flag="required"/> </authorization> </security-domain> <security-domain name="jboss-ejb-policy" cache-type="default"> <authorization> <policy-module code="Delegating" flag="required"/> </authorization> </security-domain> </security-domains> </subsystem> <subsystem xmlns="urn:jboss:domain:threads:1.1"/> <subsystem xmlns="urn:jboss:domain:transactions:1.4"> <core-environment> <process-id> <uuid/> </process-id> </core-environment> <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/> <coordinator-environment enable-statistics="true" default-timeout="300"/> </subsystem> <subsystem xmlns="urn:jboss:domain:web:1.5" default-virtual-server="default-host" native="false"> <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/> <connector name="ajp" protocol="AJP/1.3" scheme="http" socket-binding="ajp"/> <virtual-server name="default-host" enable-welcome-root="true"> <alias name="localhost"/> <alias name="example.com"/> </virtual-server> </subsystem> <subsystem xmlns="urn:jboss:domain:webservices:1.2"> <modify-wsdl-address>true</modify-wsdl-address> <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host> <endpoint-config name="Standard-Endpoint-Config"/> <endpoint-config name="Recording-Endpoint-Config"> <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM"> <handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/> </pre-handler-chain> </endpoint-config> <client-config name="Standard-Client-Config"/> </subsystem> <subsystem xmlns="urn:jboss:domain:weld:1.0"/> </profile> </profiles> <interfaces> <interface name="management"/> <interface name="public"/> <interface name="unsecure"/> </interfaces> <socket-binding-groups> <socket-binding-group name="full-ha-sockets" default-interface="public"> <socket-binding name="ajp" port="8009"/> <socket-binding name="http" port="8080"/> <socket-binding name="https" port="8443"/> <socket-binding name="jacorb" interface="unsecure" port="3528"/> <socket-binding name="jacorb-ssl" interface="unsecure" port="3529"/> <socket-binding name="jgroups-mping" port="2" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45702"/> <socket-binding name="jgroups-tcp" port="7600"/> <socket-binding name="jgroups-tcp-fd" port="57600"/> <socket-binding name="jgroups-udp" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/> <socket-binding name="jgroups-udp-fd" port="54200"/> <socket-binding name="messaging" port="5445"/> <socket-binding name="messaging-group" port="2" multicast-address="${jboss.messaging.group.address:231.7.7.7}" multicast-port="${jboss.messaging.group.port:29876}"/> <socket-binding name="messaging-throughput" port="5455"/> <socket-binding name="modcluster" port="2" multicast-address="224.0.1.105" multicast-port="23366"/> <socket-binding name="remoting" port="4447"/> <socket-binding name="txn-recovery-environment" port="4712"/> <socket-binding name="txn-status-manager" port="4713"/> <outbound-socket-binding name="mail-smtp"> <remote-destination host="localhost" port="25"/> </outbound-socket-binding> </socket-binding-group> </socket-binding-groups> <deployments> <deployment name="sqljdbc4.jar" runtime-name="sqljdbc4.jar"> <content sha1="ff439c53190a987d327165dec8b148f670cb7ca8"/> </deployment> <deployment name="wfs_ejb.jar" runtime-name="wfs_ejb.jar"> <content sha1="139596c21fbed3524bf304ccfe2a128706d406b4"/> </deployment> <deployment name="wfcustom_ejb.jar" runtime-name="wfcustom_ejb.jar"> <content sha1="00283b69bb89bcc15618e4c5cd28d88504513618"/> </deployment> <deployment name="wfs_timer_ejb.jar" runtime-name="wfs_timer_ejb.jar"> <content sha1="91b3a12fdd4bee9c3cd56e2a7da64e5b0823d7e3"/> </deployment> <deployment name="omnidocs_ejb.jar" runtime-name="omnidocs_ejb.jar"> <content sha1="d1bdbee452de8e84dac6dcdca60aaabb7aa4295a"/> </deployment> <deployment name="webdesktop.war" runtime-name="webdesktop.war"> <content sha1="71dbddf580c087e27232bbe88c7ddff72ce17815"/> </deployment> <deployment name="omnidocs.war" runtime-name="omnidocs.war"> <content sha1="0a59f26d6504fa196cb897d3ea0863ca8e051b44"/> </deployment> <deployment name="ofservices.war" runtime-name="ofservices.war"> <content sha1="1d95260b898c6d673f1776a45d52ff8e3c3ceedf"/> </deployment> <deployment name="customwebapp.war" runtime-name="customwebapp.war"> <content sha1="5089588eae2a6e373d86b307f030401238956d28"/> </deployment> <deployment name="processmanager.war" runtime-name="processmanager.war"> <content sha1="c50a55d7feba6a7ed68ef9bfe5e462a78cf437f9"/> </deployment> <deployment name="omniflowapproval.war" runtime-name="omniflowapproval.war"> <content sha1="ba676ebf2e38f1ca51a59bcc56e1ef83fc8d2572"/> </deployment> <deployment name="processmanager.war_ol" runtime-name="processmanager.war_ol"> <content sha1="301769eac66d03b7eb24271cc7b370b041405c14"/> </deployment> <deployment name="1stview.cab" runtime-name="1stview.cab"> <content sha1="6a47e2a8a73ba77507175721deb0aed08ea711db"/> </deployment> <deployment name="AnnotationToolbar.properties" runtime-name="AnnotationToolbar.properties"> <content sha1="382d32000b2869ee71895b746f4368fc673c559d"/> </deployment> <deployment name="DeleteHotFolder.jsp" runtime-name="DeleteHotFolder.jsp"> <content sha1="1493b777fbc51efe185a5b53ebde1efe5f7e437f"/> </deployment> <deployment name="ExtendSession.jsp" runtime-name="ExtendSession.jsp"> <content sha1="36aae2edb05f96bad955559a4ee1a6b2e47f0dc9"/> </deployment> <deployment name="ForceChangePassword.jsp" runtime-name="ForceChangePassword.jsp"> <content sha1="31c4934ecd9f0001b7abf635feb050c83c6a61f0"/> </deployment> </deployments> <server-groups> <server-group name="OmniFlow_Cluster" profile="full-ha"> <jvm name="omnisrvr_conf"> <heap size="2048m" max-size="2048m"/> <permgen max-size="256m"/> <jvm-options> <option value="-javaagent:E:/Appdynamics/AppServerAgent-SUN/ver4.0.3.0/javaagent.jar"/> <option value="-Dappdynamics.agent.applicationName=OmniFlow"/> <option value="-Dappdynamics.agent.tierName=EBS_Omniflow"/> </jvm-options> </jvm> <socket-binding-group ref="full-ha-sockets"/> <deployments> <deployment name="ofservices.war" runtime-name="ofservices.war"/> <deployment name="omnidocs.war" runtime-name="omnidocs.war"/> <deployment name="omnidocs_ejb.jar" runtime-name="omnidocs_ejb.jar"/> <deployment name="sqljdbc4.jar" runtime-name="sqljdbc4.jar"/> <deployment name="webdesktop.war" runtime-name="webdesktop.war"/> <deployment name="wfcustom_ejb.jar" runtime-name="wfcustom_ejb.jar"/> <deployment name="wfs_ejb.jar" runtime-name="wfs_ejb.jar"/> <deployment name="wfs_timer_ejb.jar" runtime-name="wfs_timer_ejb.jar"/> <deployment name="customwebapp.war" runtime-name="customwebapp.war"/> </deployments> <system-properties> <property name="jboss.cluster.tcp.initial_hosts" value="162.123.228.158[7600],162.123.228.157[7600]" boot-time="true"/> </system-properties> </server-group> <server-group name="Reports_Cluster" profile="full-ha"> <jvm name="omnisrvr_conf"> <heap size="2048m" max-size="2048m"/> <permgen max-size="256m"/> <jvm-options> <option value="-javaagent:E:/Appdynamics/AppServerAgent-SUN/ver4.0.3.0/javaagent.jar"/> <option value="-Dappdynamics.agent.applicationName=OmniFlow"/> <option value="-Dappdynamics.agent.tierName=EBS_Omniflow"/> </jvm-options> </jvm> <socket-binding-group ref="full-ha-sockets"/> <deployments> <deployment name="omnidocs_ejb.jar" runtime-name="omnidocs_ejb.jar"/> <deployment name="sqljdbc4.jar" runtime-name="sqljdbc4.jar"/> <deployment name="wfcustom_ejb.jar" runtime-name="wfcustom_ejb.jar"/> <deployment name="wfs_ejb.jar" runtime-name="wfs_ejb.jar"/> <deployment name="wfs_timer_ejb.jar" runtime-name="wfs_timer_ejb.jar"/> <deployment name="processmanager.war" runtime-name="processmanager.war"/> </deployments> <system-properties> <property name="jboss.cluster.tcp.initial_hosts" value="162.123.228.158[7700],162.123.228.157[7700]" boot-time="true"/> </system-properties> </server-group> </server-groups> </domain>

Log4j generate different files with the same content

I'm working with a Java application that integrates log4j. For a new development I would need that instead of generating a file I will generate two, one per country that is accessed from the application web. Both would have the same log records that are found throughout my application.
I configured the configuration using an .xml file:
<!-- Appenders -->
<appender name="console" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="jeveris: %d{dd MMM yyyy HH:mm:ss,SSS} %-5p %c - %m%n" />
</layout>
</appender>
<appender name="One-Console" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="Console.log" />
<param name="Append" value="true" />
<param name="MaxFileSize" value="2MB" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d{dd MMM yyyy HH:mm:ss,SSS} %-5p %c - %m%n" />
</layout>
</appender>
<category name="com.example.one.web">
<level value="debug" />
<appender-ref ref="One-Console" />
</category>
<root>
<appender-ref ref="console" />
<level value="debug" />
</root>
</log4j:configuration>
Could someone guide me, tell me if it is possible or help me find the solution?
Thank you.
If you want 2+ log files that will print the same content, then you could fine 2 different files in your tag like so:
<configuration status="OFF">
<Properties>
<Property name="log-path">/your/file/path/</Property>
<Property name="log-country-name1">Country1</Property>
<Property name="log-country-name2">Country2</Property>
<!-- more if necessary -->
<Property name="log-pattern">%d{ISO8601} %-5p [%t|%c{1}] %m\n</Property>
<Property name="rollover-strategy-max">5</Property>
<Property name="rolling-size-based">10 MB</Property>
</Properties>
<appenders>
<!--uncomment following if want to print to console as well -->
<!-- <Console name="Console" target="SYSTEM_OUT">
<PatternLayout>
<pattern>${log-pattern}</pattern>
</PatternLayout>
</Console> -->
<RollingFile name="INFO" fileName="${log-path}/${log-country-name1}-logger.log" filePattern="${log-path}/${log-project-name}-debug-%d-%i.log.zip">
<PatternLayout>
<pattern>${log-pattern}</pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy size="${rolling-size-based}" />
</Policies>
<DefaultRolloverStrategy max="${rollover-strategy-max}" />
</RollingFile>
<RollingFile name="INFO" fileName="${log-path}/UpdaterLocal-logger.log" filePattern="${log-path}/${log-country-name2}-debug-%d-%i.log.zip">
<PatternLayout>
<pattern>${log-pattern}</pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy size="${rolling-size-based}" />
</Policies>
<DefaultRolloverStrategy max="${rollover-strategy-max}" />
</RollingFile>
</appenders>
<Loggers>
<logger name="io.switchfour" level="trace" additivity="false">
<AppenderRef ref="INFO" level="info" />
</logger>
</Loggers>
The above will create /your/file/path/Country1-logger.log and /your/file/path/Country2-logger.log and will write all entries that are INFO or higher to both files. Your log file should be identical.

Hybris Solr failed to load core

I am new to hybris and trying to load my apparel store data. Whenever I perform an ant initialize, I get the following error:
org.apache.solr.common.SolrException: Could not load conf for core mProduct: Plugin init failure for [schema.xml] fieldType "string": Error loading class 'de.hybris.platform.solrfacetsearch.ysolr.similarity.FixedTFIDFSimilarityFactory'. Schema file is E:\hybris\config\solr\instances\default\configsets\default\conf\schema.xml
at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:80)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:725)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:701)
at org.apache.solr.handler.admin.CoreAdminHandler.handleCreateAction(CoreAdminHandler.java:629)
at org.apache.solr.handler.admin.CoreAdminHandler.handleRequestInternal(CoreAdminHandler.java:214)
at org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(CoreAdminHandler.java:194)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:143)
at org.apache.solr.servlet.HttpSolrCall.handleAdminRequest(HttpSolrCall.java:675)
at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:443)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:210)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:179)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.solr.common.SolrException: Plugin init failure for [schema.xml] fieldType "string": Error loading class 'de.hybris.platform.solrfacetsearch.ysolr.similarity.FixedTFIDFSimilarityFactory'. Schema file is E:\hybris\config\solr\instances\default\configsets\default\conf\schema.xml
at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:596)
at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:175)
at org.apache.solr.schema.IndexSchemaFactory.create(IndexSchemaFactory.java:55)
at org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:69)
at org.apache.solr.core.ConfigSetService.createIndexSchema(ConfigSetService.java:104)
at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:75)
... 30 more
Caused by: org.apache.solr.common.SolrException: Plugin init failure for [schema.xml] fieldType "string": Error loading class 'de.hybris.platform.solrfacetsearch.ysolr.similarity.FixedTFIDFSimilarityFactory'
at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:178)
at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:489)
... 35 more
Caused by: org.apache.solr.common.SolrException: Error loading class 'de.hybris.platform.solrfacetsearch.ysolr.similarity.FixedTFIDFSimilarityFactory'
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:491)
at org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:560)
at org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:525)
at org.apache.solr.schema.IndexSchema.readSimilarity(IndexSchema.java:977)
at org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:109)
at org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:52)
at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:152)
... 36 more
Caused by: java.lang.ClassNotFoundException: de.hybris.platform.solrfacetsearch.ysolr.similarity.FixedTFIDFSimilarityFactory
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.net.FactoryURLClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:475)
... 42 more
This is how my localextensions.xml looks like:
<hybrisconfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="resources/schemas/extensions.xsd">
<extensions>
<path dir="${HYBRIS_BIN_DIR}" />
<path dir="${HYBRIS_BIN_DIR}/custom" />
<!-- ext-platform -->
<extension name="admincockpit" />
<extension name="backoffice" />
<extension name="cockpit" />
<extension name="hmc" />
<extension name="mcc" />
<extension name="platformhmc" />
<extension name="amazoncloud" />
<!-- ext-commerce -->
<extension name="btg" />
<extension name="btgcockpit" />
<extension name="commercesearch" />
<extension name="commercesearchbackoffice" />
<extension name="commercesearchhmc" />
<extension name="commerceservices" />
<extension name="basecommerce" />
<extension name="payment" />
<extension name="promotions" />
<extension name="voucher" />
<extension name="customerreview" />
<extension name="ticketsystem" />
<extension name="solrfacetsearch" />
<extension name="solrfacetsearchhmc" />
<extension name="wishlist" />
<extension name="commercefacades" />
<!-- ext-data -->
<extension name="commercesearchsampledata" />
<extension name="mediaconversion" />
<!-- ext-content -->
<extension name="productcockpit" />
<extension name="cms2" />
<extension name="cms2lib" />
<extension name="cmscockpit" />
<extension name="mobileoptionals" />
<extension name="mobileservices" />
<extension name="cscockpit" />
<extension name="instore" />
<!-- ext-addon -->
<extension name="addonsupport" />
<!-- ext-accelerator -->
<extension name="acceleratorservices" />
<extension name="acceleratorfacades" />
<extension name="acceleratorcms" />
<extension name="acceleratorstorefrontcommons" />
<!-- Solr server extension -->
<extension name="solrserver"/>
<!-- Lucene-search extension for backoffice -->
<extension name="lucenesearch"/>
<extension name='warehousingbackoffice' />
<extension name='paymentgatewaymockaddon' />
<!-- Adding extensions for backoffice -->
<!-- add them at the end of every backoffice extension -->
<extension name="platformbackoffice"/>
<extension name="mediaconversionbackoffice"/>
<!-- unbxd integration -->
<extension name="unbxd"/>
</extensions>
</hybrisconfig>
Is there anyway I can resolve this issue ?
It looks like the jar file that contains FixedTFIDFSimilarityFactory is not found when core is loaded. It should be either in the lib directory or referenced in solrconfig.xml. Perhaps the location the library is put into is different from where your Solr/core is.
The jar library mentioned by #Alexandre is hybriscomponents.5.5.1.0.jar (or the newer one: solr-hybris-components-7.4.3.jar). The package of class FixedTFIDFSimilarityFactory has changed with the version of the JAR file.
All you need to do is change all references from:
de.hybris.platform.solrfacetsearch.ysolr.similarity.FixedTFIDFSimilarityFactory
into:
de.hybris.platform.lucene.search.similarities.FixedTFIDFSimilarityFactory
inside all your schema*.xml files.

ant run target if file has specifc suffix

I pass a filename to ant script via
ant -Dfilepath=/foo/bar/foobar.suffix
I want to copy it to a destination and if it is a .js file generate a compiled version of it.
This works but currently the compile task runs on all files not just .js file.
How do I exclude non .js files in the "runjscompile" task?
In a fileset I would do this (but I don't get how to apply this on the task):
<fileset dir="${foo}" casesensitive="yes">
<exclude name="**/*.min.js" />
<include name="**/*.js" />
</fileset>
My build.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project name="test" basedir="." default="build">
<taskdef name="jscomp" classname="com.google.javascript.jscomp.ant.CompileTask" classpath="/home/bar/bin/compiler.jar" />
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="/usr/share/java/ant-contrib.jar" />
</classpath>
</taskdef>
<property name="serverRoot" value="/home/bar/server/public_html" />
<property name="foo" value="${serverRoot}/foo/" />
<property name="workspaceRoot"
value="/home/bar/Zend/workspaces/DefaultWorkspace/" />
<property name="foo_service" value="${workspaceRoot}/foo_service/" />
<property name="filepath" value="${filepath}" />
<target name="build" depends="transferFile, runjscompile" />
<target name="transferFile" description="overwrite old file">
<basename property="filename" file="${filepath}" />
<dirname property="path" file="${filepath}" />
<pathconvert property="path.fragment" pathsep="${line.separator}">
<propertyresource name="path" />
<mapper type="regexp" from="^/[^/]+/(.*)" to="\1" />
</pathconvert>
<echo message="copy ${workspaceRoot}${filepath} to ${foo}${path.fragment}${filename}" />
<copy file="${workspaceRoot}${filepath}" tofile="${foo}${path.fragment}${filename}"
overwrite="true" force="true" />
<property name="destFile" value="${foo}${path.fragment}${filename}" />
</target>
<target name="runjscompile">
<echo message="compile ${destFile}" />
<basename property="file" file="${destFile}" />
<basename property="prefix" file="${destFile}" suffix=".js" />
<dirname property="directory" file="${destFile}" />
<echo message="Compressing file ${file} to ${directory}/${prefix}.min.js" />
<jscomp compilationLevel="simple" debug="false" output="${directory}/${prefix}.min.js" forceRecompile="true">
<sources dir="${directory}">
<file name="${file}" />
</sources>
</jscomp>
</target>
</project>
Add another target which checks the file suffix with a <condition> and sets a property if it matches, then make the jscompile target conditional on that. Following your fileset example you probably want something like:
<target name="check.js">
<condition property="do.jscompile">
<!-- check for filepath that ends .js but not .min.js -->
<matches string="${filepath}" pattern=".*(?<!\.min)\.js$$" />
</condition>
</target>
<target name="build" depends="check.js, transferFile, runjscompile" />
<target name="runjscompile" if="do.jscompile">

Resources