Monday, May 18, 2015

SP2-0768: Illegal SPOOL command

SP2-0768: Illegal SPOOL command
Usage: SPOOL { | OFF | OUT }
where is file_name[.ext] [CRE[ATE]|REP[LACE]|APP[END]]



This error came when you are trying to create log file from SQL* loader using SPOOL command.

reason:
This error came because of two reason
1. Wrong path for spool file
2. @*.sql file contain invalid characters

Solve:

1. In my case i am trying to set spool file at path

spool C:\Users\******\Desktop\New folder\extract.log

It throws error because of "New folder" Folder name contain space
so Correct syntax to write the command either remove the space from folder name or enclosed the path in single quotes

2. If you are tring to execute the @*.sql file which contain the spool command can cause error
because some times in linux file contains
invalid characters like ^M

In that case you need to remove the invalid chars from file.

Wednesday, May 13, 2015

SP08 Modify SpagoBi login page

U can modify the spagobi login page  as per your choice. In this post i am going to remove default logic icons just below the login box.


ie. biuser/biuser biadmin/biadmin bidemo/bidemo

For this You need to remove *.png file and need to modify login.jsp file.

step1:
Move to below path and remove *.png file (biuser_icon,biadmin_icon,didemo_icon)
apache-tomcat-7.0.59\webapps\SpagoBI\themes\sbi_default\img\wapp


Step 2
Now move to path "apache-tomcat-7.0.59\webapps\SpagoBI\themes\sbi_default\jsp\login.jsp"
Go to line numner 361

delete below code from login.jsp file



 <tr>  
 <td align="center"><a href="#"  
      onclick="setUser('biuser','biuser'); login.submit()"><img  
           src='<%=urlBuilder.getResourceLinkByTheme(request, "/img/wapp/biuser_icon.png", currTheme)%>'  
           width='68px' height='47px' />  
 </a></td>  
 <td align="center"><a href="#"  
      onclick="setUser('bidemo','bidemo'); login.submit()"><img  
           src='<%=urlBuilder.getResourceLinkByTheme(request, "/img/wapp/bidemo_icon.png", currTheme)%>'  
           width='75px' height='47px' />  
 </a></td>  
 <td align="center"><a href="#"  
      onclick="setUser('biadmin','biadmin'); login.submit()"><img  
           src='<%=urlBuilder.getResourceLinkByTheme(request, "/img/wapp/biadmin_icon.png", currTheme)%>'  
           width='69px' height='47px' />  
 </a></td>  
 </tr>  
 <tr>  
 <td align="center"><a href="#"  
      onclick="setUser('biuser','biuser'); login.submit()"><b>biuser/biuser</b>  
 </a></td>  
 <td align="center"><a href="#"  
      onclick="setUser('bidemo','bidemo'); login.submit()"><b>bidemo/bidemo</b>  
 </a></td>  
 <td align="center"><a href="#"  
      onclick="setUser('biadmin','biadmin'); login.submit()"><b>biadmin/biadmin</b>  
 </a></td>  
 </tr>  

save and refresh the login page.

Wednesday, May 6, 2015

SP07 Spagobi error: invalid entry size (expected " " but got " " bytes)

WARNING: Failed to process JAR [jar:jndi:/localhost/SpagoBI/WEB-INF/lib/jfreechart-1.0.9.jar!/org/jfree/data/time/DynamicTimeSeriesCollection.class] for TLD files
java.util.zip.ZipException: invalid entry size (expected 11261 but got 11226 bytes)
    at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:403)
    at java.util.zip.ZipInputStream.read(ZipInputStream.java:195)
    at java.util.jar.JarInputStream.read(JarInputStream.java:207)
    at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:139)
    at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:117)
    at java.util.jar.JarInputStream.getNextEntry(JarInputStream.java:142)
    at java.util.jar.JarInputStream.getNextJarEntry(JarInputStream.java:179)
    at org.apache.catalina.startup.TldConfig.tldScanJar(TldConfig.java:533)
    at org.apache.catalina.startup.TldConfig.access$100(TldConfig.java:60)
    at org.apache.catalina.startup.TldConfig$TldJarScannerCallback.scan(TldConfig.java:333)
    at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:234)
    at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:159)
    at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:307)
    at org.apache.catalina.startup.TldConfig.lifecycleEvent(TldConfig.java:595)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5103)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1055)
    at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:978)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1322)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
    at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:379)
    at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:324)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1041)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:303)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)


Solution : jar file is corrupt at specified path "/localhost/SpagoBI/WEB-INF/lib/jfreechart-1.0.9.jar"

replace ur jar file with new one.

SP06 Spagobi error apache.catalina.realm.UserDatabaseRealm startInternal

Apr 29, 2015 12:10:50 PM org.apache.catalina.realm.UserDatabaseRealm startInternal
SEVERE: Exception looking up UserDatabase under key UserDatabase
javax.naming.NameNotFoundException: Name UserDatabase is not bound in this Context
    at org.apache.naming.NamingContext.lookup(NamingContext.java:803)
    at org.apache.naming.NamingContext.lookup(NamingContext.java:159)
    at org.apache.catalina.realm.UserDatabaseRealm.startInternal(UserDatabaseRealm.java:255)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.realm.CombinedRealm.startInternal(CombinedRealm.java:201)
    at org.apache.catalina.realm.LockOutRealm.startInternal(LockOutRealm.java:120)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1026)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:303)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)

Apr 29, 2015 12:10:50 PM org.apache.catalina.realm.CombinedRealm startInternal
SEVERE: Failed to start "org.apache.catalina.realm.UserDatabaseRealm/1.0" realm
org.apache.catalina.LifecycleException: No UserDatabase component found under key UserDatabase
    at org.apache.catalina.realm.UserDatabaseRealm.startInternal(UserDatabaseRealm.java:264)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.realm.CombinedRealm.startInternal(CombinedRealm.java:201)
    at org.apache.catalina.realm.LockOutRealm.startInternal(LockOutRealm.java:120)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1026)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:303)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)

I faced this error while running of spagobi server.

solution :-
user can please comment for the solution if anybody have!!!!!

SP05 java.lang.OutOfMemoryError: PermGen space

it.eng.spagobi.commons.filters.SpagoBICoreCheckSessionFilter.doFilter:
------------------------------------------------------------------------------
Exception in thread ""http-bio-8080"-exec-5"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread ""http-bio-8080"-exec-5"
Exception in thread ""http-bio-8080"-exec-8" Exception in thread ""http-bio-8080"-exec-6" java.lang.OutOfMemoryError: PermGen space
Exception in thread ""http-bio-8080"-exec-9" java.lang.OutOfMemoryError: PermGen space
java.lang.OutOfMemoryError: PermGen space
Exception in thread ""http-bio-8080"-exec-7" java.lang.OutOfMemoryError: PermGen space
Exception in thread ""http-bio-8080"-exec-10" java.lang.OutOfMemoryError: PermGen space


Cause - Less memory assigned to application server

solution : Need to increase memory parameter or add memory parameter in "cataline.bat" file of apache tomcat. (at line number 286, before line "rem Execute Java with the applicable properties")

set "JAVA_OPTS=%JAVA_OPTS% -Xms2048m -Xmx2048m -XX:PermSize=512m -XX:MaxPermSize=512m"


SP04 Rotate labels of barchart (high chart)

To rotate the label of bar chart we need to modify XML template of chart.

 <X_AXIS title='Name' alias='column_name_from_query'>   
 <LABELS rotation='-45'/>  
 </X_AXIS>  



-45 - will rotate label at 45 degree
90 will show label perpendicular to x-axis

Note*_ we can also add "LABELS rotation='-45'"  for Y-AXIS

Tuesday, May 5, 2015

SP03 The field string-"" must me an alphabetical string (only letters)

The field string-"" must me an alphabetical string (only letters)

I faced this error during drill down of chart 1 to 2nd chart.

I created an analytical driver of type = "string"  and same driver is being used by chart properties.

Below is the picture of analytical properties , where you can see under "predefined values constrains"
"Letter" is checked



Which is causing to populate this error. Here we are actually add consrtaint on string type which will check that string should contain only "LETTER"

How to Resolve:
Go to Profiling - Analytical driver management - identify the driver from chart properties and edit the analytical driver
remove the constraints

Friday, May 1, 2015

SP2 Configure spagoBI server - stand alone apache tomcat

Requirement
1. postgres
2. All-In-One-SpagoBI-5.0-01102014
3. SpagoBIStudio_5.0.0_win32_23102014
4. postgres-dbscript-5.0.0_15092014
5. database any one oracle/sqlserver/mysql (i am using sqlserver)
6. apache tomcat 7
7. java jdk

go step by step
1. extract apache tomcat to some folder
2. extract All-In-One-SpagoBI-5.0-01102014.zip to folder and move to folder
    e:\SpagoBI-Server-5.0-16092014\webapps\* cut or copy all spago engines to E:\apache-tomcat-7.0.61\webapps\*
  

3. move all library jar file from spago lib folder to apache tomcat
    SpagoBI-Server-5.0-16092014\lib\* to apache-tomcat-7.0.61\lib\*
   
4. Move postgres and sqljdbc driver to "apache-tomcat-7.0.61\webapps\SpagoBI\WEB-INF\lib\"    as well as at "apache-tomcat-7.0.61\lib\*"

5. we will going to create the spago repository on POSTGRES db, (i am not prefer sqlserver for spago repository.. for my case it throws lot of unresolved errors)
    so for this we need to execute script from zip file "postgres-dbscript-5.0.0_15092014"
    -create database "spagobi"
    - execute script:
        "PG_Create", "pg_create_quartz_schema"

6. modify server.xml file:
    add below text under "GlobalNamingResources" tag.
 <Environment name="spagobi_resource_path" type="java.lang.String" value="${catalina.base}/resources"/>  
 <Environment name="spagobi_sso_class" type="java.lang.String" value="it.eng.spagobi.services.common.FakeSsoService"/>  
 <Environment name="spagobi_service_url" type="java.lang.String" value="http://localhost:8080/SpagoBI"/>  
 <Environment name="spagobi_host_url" type="java.lang.String" value="http://localhost:8080"/>  
 <Resource name="jdbc/spagobi"  
 auth="Container"  
 type="javax.sql.DataSource"  
 driverClassName="org.postgressql.Driver"  
 url="jdbc:postgressql://localhost:5432/spagobi"  
 username="postgres"  
 password="postgres"  
 maxActive="20"  
 maxIdle="10"  
 maxWait="-1"/>  

7. Remove code from server.xml file

 <Resource name="UserDatabase" auth="Container"  
 type="org.apache.catalina.UserDatabase"  
 description="User database that can be updated and saved"  
 factory="org.apache.catalina.users.MemoryUserDatabaseFactory"  
 pathname="conf/tomcat-users.xml" />       


8. Modify context.xml
remove context tag and replace with below code

 <Context docBase="SpagoBIProject" path="/SpagoBI" privileged="true" reloadable="true" source="org.eclipse.jst.j2ee.server:SpagoBIProject">  
    <ResourceLink global="jdbc/spagobi" name="jdbc/spagobi" type="javax.sql.DataSource"/>   
    <ResourceLink global="spagobi_resource_path" name="spagobi_resource_path" type="java.lang.String"/>   
    <ResourceLink global="spagobi_sso_class" name="spagobi_sso_class" type="java.lang.String"/>   
    <ResourceLink global="spagobi_host_url" name="spagobi_host_url" type="java.lang.String"/>   
    <WatchedResource>WEB-INF/web.xml</WatchedResource>  
 </Context>  

9. Now need to modify files at path: "apache-tomcat-7.0.61\webapps\SpagoBI\WEB-INF\classes\"

10. modify file "apache-tomcat-7.0.61\webapps\SpagoBI\WEB-INF\classes\hibernate.cfg.xml"

 remove HSQLdialect from file <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>  
 and add postgres dialect <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property> (at line number 17)  


11. modify file "apache-tomcat-7.0.61\webapps\SpagoBI\WEB-INF\classes\jbpm.hibernate.cfg"
Add postgres dialect at line number 19

 <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>  

12. modify "apache-tomcat-7.0.61\webapps\SpagoBI\WEB-INF\classes\quartz.properties" file
Comment line number 31 (using #) for HSQL delegate
uncomment line number 37 for POSTGRESDelegate
i.e.
org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate

13. Dont forget to create enviornment variable of JAVA_HOME [upto path java-jdk] and path entry upto "bin" folder.

14. Set variable "JAVA_OPTS" in "catalina.bat" file
open file and add below line just above the line "rem Execute Java with the applicable properties"
set "JAVA_OPTS=%JAVA_OPTS% -Xms2048m -Xmx2048m -XX:PermSize=512m -XX:MaxPermSize=512m"

web stats