Free Support Forum - aspose.com

License cannot be applied

Hello, we just bought Aspose.Words for java license and we want to use it on an oracle database. I created a java class containing the two commands you provided us but I am getting the error: "Package Aspose.Words does not exist". I put the lic file into the CLASSPATH variable of the database, with no luck. What should we do? Thanks, Angelina Sokratous

Also, the commands we used are:

<!–[if gte mso 9]>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-GB</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:dispDef/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
</m:mathPr></w:WordDocument>
<![endif]–><!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";}

<![endif]–>

[Java]

License license = new License();

license.setLicense("Aspose.Words.lic");


What is the procedure to apply the xml license file into the oracle database?

Thanks,
Angelina

Hi Angelina,

Thanks for your request. First of all you should add a reference to Aspose.Words JAR. com.aspose.words.License class is defined in this JAR. Since you did not added the reference you get this compilation error.

Best regards,

Hello Alexey,

thanks for your response. I add the: import com.aspose.words.* in my java class, but now although the License class is recognized, since it exists in the com.aspose.words package, the setLicense method is not recognized. I tried to add the .lic file into the JAR I used… but with no lack.

Where should I put the .lic file in order for the setLicense method to be recognized?

Thank you in advance,
Angelina

Hi Angelina,

Thanks for your request. the license file can be located anywhere where you application can access it. Please see the following link for more information:

http://www.aspose.com/documentation/java-components/aspose.words-for-java/applying-a-license.html

In your case the problem occurs because you did not add reference to Aspose.Words JAR. I understand that you added imports com.aspose.words, but I suppose it is not recognized. It is not recognized because you did not add a reference to JAR.

http://www.wikihow.com/Add-JARs-to-Project-Build-Paths-in-Eclipse-(Java)

Best regards,

Hello again,

the thing is that we are not using any IDE to apply the license like you describe. We want to apply it on an oracle database… in which we have an oracle package which calls a stored java procedure.

Before bying the licence I used the loadjava function to upload the Aspose.Words.jdk15.jar file to the database. Now, I used the loadjava again to upload the Aspose.Words.lic but the setLicense method is not recognized.

Any ides on how to apply the .lic file to the database?

Thanks,
Angelina

Hi Angelina,

Thanks for your request. You do not need to use loadjava to load the license file. You have to use loadjava to load Aspose.Words Jar as you did before and in the code just apply the license specifying a path to the license file.

Best regards,