Jump to content
Changes to the Jaspersoft community edition download ×

ldangelo

Members
  • Posts

    18
  • Joined

  • Last visited

ldangelo's Achievements

Apprentice

Apprentice (3/14)

  • First Post Rare
  • Collaborator Rare
  • Conversation Starter Rare
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. This forum rocks! Thank you all for the feedback. Right now I'm going to patch my 3.5 install and do an upgrade in our next iteration. Unfortunately we have modified jasper server community edition to allow it to run in a multi-tenant environment as well as changes to the UI to restrict access to certain functions and add a "wizard" for report generation... If you guys have any interest in what we have done you can check it out here: http://www.orangeleap.com/theguru.shtml Obviously this is open source so if you want to use it feel free. Again, thank you! -LeoD
  2. Hi All, I'm wondering if anyone has experienced this problem (or if it has been fixed in a later version). We are using jasper server to schedule report execution. The output of the reports is stored in a folder in the repository "Content files". The reports being generated are very large 80-160 MB. And there are a lot of them. When you use the jasper server UI to view the contents of this folder it issues a query to get the list of JFileResource in that folder... The problem comes when this query returns the data stored in the blob. Obviously with 100's of reports generated 80M and larger this is not going scale (we run out of memory). So my questions: 1) Is this the case in the most recent version of JS? 2) Has anyone else experienced this problem? 3) Why would it return the contents of the blob at all? Is this necessary? I know that conventional wisdom on this forum is to increase the amount of heap available. However, we are running jasper server in a multi-tentant environment with 50 companies accessing the same instance with an average of 5 users per company. Obviously increasing heap space will eventually fail if say 3 people click on the folder at the same time... What I'm looking at doing is modifying the source to not include the contents of the blob but I have no idea what the impact of doing this would be. Any advice would be appreciated...
  3. Hi All, I thought I would add this to the forums as I spent a lot of time getting jasper server to generate very large reports (80M on 2 million records)... Hopefully this will save someone a lot of time... First, we all know about the virtualizer but this only virtualizes report pages (and not the result set). By default jasper will fetch the entire result set into memory before it starts to generate the report. This is very fast but not very memory efficient. The solution to this problem is to get jdbc to "stream" result's back to jasper server... In order to stream the result set you need to set your driver to stream results... The settings below work for mysql but I assume they work for others as well. So here are the changes you will want to make and why: Modify applicationContext.xml: Change the com.jaspersoft.jasperserver.api.engine.common.service.impl.FileVirtualizerFactory to com.jaspersoft.jasperserver.api.engine.common.service.impl.SwapFileVirtualizerFactory and comment out the property directory. It should look like this when you are done... <bean id="fileVirtualizerFactory" class="com.jaspersoft.jasperserver.api.engine.common.service.impl.SwapFileVirtualizerFactory"> <property name="maxSize" value="400"></property> <!-- <property name="directory" value="${java.io.tmpdir}"></property> --> </bean> This will change jasper to use a single file for paging instead of multiple files per page... The report I generated was 400,000 pages so obviously that is a lot of files to be creating... jasperreports.properties Use these settings... net.sf.jasperreports.governor.max.pages.enabled=true net.sf.jasperreports.governor.timeout.enabled=true net.sf.jasperreports.jdbc.concurrency=readOnly net.sf.jasperreports.jdbc.fetch.size=-2147483648 net.sf.jasperreports.jdbc.holdability=close net.sf.jasperreports.jdbc.result.set.type=forwardOnly The last four settings are the "trick" to put the mysql connector into "streaming" mode... It will not load the entire result set into memory and then try and build the report. Lastly you will need to modify your mysql configuration so the jdbc url you use has the following: ?maxAllowedPacket=104857600 Also you need to modify your my.cnf (mysql configuration) to include the following in the [mysqld] section: max_allowed_packet = 100M So what do these last two settings do? When jasper server generates a large report with the scheduler it will try and store the results into the repository. Without these settings you will get a nasty error when jasper tries to insert the output of the report into the repository saying something like "Caused by: com.mysql.jdbc.PacketTooBigException: Packet for query is too large (85530691 > 16777216). You can change this value on the server by setting the max_allowed_packet' variable.". With the above settings you can write a generated report up to 100M into the repository.. In production we use 160M to give some head room for larger reports... I hope this helps save someone some time in tuning jasper server. If it helps you feel free to give me some karma points ;^)... BTW) Using these settings I generated a 80M report (csv) on 2 million rows with only 512M allocated to the java heap!.. Obviously, we would use more Heap Space in production but I was looking to restrict the JVM's memory to ensure that the above settings really work. -LeoD
  4. Hi All, I'm using iReports to generate *very* large reports (the last one I generated was 308,086 pages on 2.4 million records). After tuning I've finally had success getting these reports to generate without throwing an out of memory exception. Which is great and I appreciate all of your hard work! So here is the question... After I run iReport under the above conditions I generate the report. Save the report and then close the report within iReport. However, the memory usage does not go down in iReport. For example... If I look at iReport in visualvm I see 308,086 JRVirtualPrintPage instances in memory <---- the exact same number of pages generated... What gives? Is this normal? Why would iReport's hang on to these objects even though I closed the report? Any advice? Thanks in advance and keep up the great work! -LeoD Post Edited by ldangelo at 08/16/2010 20:42 Post Edited by ldangelo at 08/16/2010 20:43 Post Edited by ldangelo at 08/16/2010 20:56
  5. Never mind... This was operator error (I was compiling against the wrong jar DOH)... The code as outlined above works fine.
  6. Hi all, I'm wondering if someone can help me out... I'm using the API's to generate jrxml. I'm looking for an example of how you turn a text field into a hyperlink? I've done the following: JRDesignExpression hlpe = new JRDesignExpression(); hlpe.setValueClassName("java.lang.String"); hlpe.setText("http://localhost;8080/orangeleap/"); textField.setHyperlinkReferenceExpression(hlpe); textField.setHyperlinkType(JRHyperlink.HYPERLINK_TYPE_REFERENCE); //FIXME Should this be a parameter in the future? But when I generate the report I get an error that says: Class not set for hyperlink reference expression.Can anyone help me out?Thanks in advance,-LeoD
  7. Currently there are no soap API's (that I'm aware of) to get a list of scheduled reports. To get a list of reports is fairly easy. If you do a search on my posts I just posted a respose to this question (with code samples).
  8. Here is some code that should help you out... This took a bit to figure out.... this code has the pdf file in the tempLabelFile. Hope this helps! -LeoD Code: // // now put this report into the "Content files" directory of the repository ResourceDescriptor labelRD = new ResourceDescriptor(); ResourceDescriptor reportRD = new ResourceDescriptor(); Date date = new Date(); DateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); try { labelRD.setName(getLabelTemplateName() + dateFormat.format(date)); labelRD.setLabel(labelRD.getName()); labelRD.setDescription(labelRD.getName()); labelRD.setParentFolder("/Reports/" + getSite().getName() + "/Content_files"); labelRD.setUriString(labelRD.getParentFolder() + "/" + labelRD.getName()); labelRD.setWsType(labelRD.TYPE_CONTENT_RESOURCE); labelRD.setResourceProperty(ResourceDescriptor.PROP_CONTENT_RESOURCE_TYPE,ResourceDescriptor.CONTENT_TYPE_PDF); labelRD.setIsNew(true); labelRD.setHasData(true); { RequestAttachment[] attachments; FileDataSource fileDataSource = new FileDataSource(tempLabelFile); RequestAttachment attachment = new RequestAttachment(fileDataSource); attachment.setContentID(labelRD.getName()); attachments = new RequestAttachment[]{attachment}; jserver.getWSClient().putResource(labelRD, attachments); }
  9. Here is some code that should help you out.... Code:package com.mpower.service;import java.util.List;public interface JasperServerService { List list(String dir) throws Exception; void setPassword(String pass); String getPassword(); void setUserName(String username); String getUserName(); void setURI(String URI); String getURI();}package com.mpower.service;import java.util.List;import org.springframework.stereotype.Service;import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor;import com.jaspersoft.jasperserver.irplugin.JServer;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;//@Service("jasperServerService")public class JasperServerServiceImpl implements JasperServerService { protected final Log logger = LogFactory.getLog(getClass()); private String userName; private String password; private String uri; private JServer jserver; @Override public String getPassword() { return password; } @Override public String getURI() { return uri; } @Override public String getUserName() { return userName; } @Override public List list(String dir) throws Exception { logger.info("list(" + dir + ")"); jserver = new JServer(); jserver.setUsername(userName); jserver.setPassword(password); jserver.setUrl(uri); ResourceDescriptor rd = new ResourceDescriptor(); rd.setWsType(ResourceDescriptor.TYPE_FOLDER); rd.setUriString(dir); return jserver.getWSClient().list(rd); } @Override public void setPassword(String pass) { logger.info("setPassword(" + pass + ")"); password = pass; } @Override public void setURI(String URI) { logger.info("setURI(" + URI + ")"); uri = URI; } @Override public void setUserName(String username) { logger.info("setUserName(" + username + ")"); userName = username; } }
  10. These are two separate issues... First, you can have multiple authentication providers under spring security. So if you still have daoProvider enabled (which I suspect you do) the default logins will still work as it will check the daoProvider if the ldapProvider fails... Here is how I have our ldap provider configured... (I don't know anything about Novell but hopefully this will help). NOTE: We implemented our own ldap authentication provider but you should be able to use the standard provider. <!-- ======================== AUTHENTICATION ======================= --> <bean id="authenticationManager" class="org.acegisecurity.providers.ProviderManager"> <property name="providers"> <list> <!-- not on by default <ref local="ldapAuthenticationProvider"/> --> <!-- <ref local="daoAuthenticationProvider"/> --> <ref local="commonLdapAuthenticationProvider"/> <ref local="anonymousAuthenticationProvider"/> <!--ref local="jaasAuthenticationProvider"/--> </list> </property> </bean> <bean id="commonLdapAuthenticationProvider" class="com.mpower.security.CommonLdapAuthenticationProvider"> <property name="userDetailsService"><ref bean="userAuthorityService"/></property> <property name="initialDirContextFactory"><ref local="initialDirContextFactory" /></property> <property name="userLookupPattern"><value>uid={0},ou=users,o={1}</value></property> </bean>
  11. I have some unique authentication requirements for a deployment and ended up writting a custom UserAuthorityService (basically I copied the one out of jasperserver gutted it and them created my own implementation). The authentication part of the application works great I can log in, modify users, create users, modify roles just fine (assuming I have the ROLE_ADMINISTRATOR). My problem is that I can not access the webservices with the same users? If I try and do a put I get an 'Access Denied' error. Interestingly enough my get(s) are working just fine. Any advice on what the problem might be? Thanks in advance, -LeoD
  12. Thanks Sherman, This is exactly what I ended up doing. Works great! -LeoD
  13. I got this to work by modifying applicationContext-security.xml. I have added the contents of this file here in hopes that it helps someone else out: <?xml version="1.0" encoding="UTF-8"?> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd"> CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON PATTERN_TYPE_APACHE_ANT /xmla=httpSessionContextIntegrationFilter,basicProcessingFilter,JIAuthenticationSynchronizer,anonymousProcessingFilter,basicAuthExceptionTranslationFilter,filterInvocationInterceptor /services/**=httpSessionContextIntegrationFilter,portletAuthenticationProcessingFilter,basicProcessingFilter,passwordExpirationProcessingFilter,JIAuthenticationSynchronizer,anonymousProcessingFilter,basicAuthExceptionTranslationFilter,filterInvocationInterceptor /**=httpSessionContextIntegrationFilter,userPreferencesFilter,authenticationProcessingFilter,userPreferencesFilter,basicProcessingFilter,requestParameterAuthenticationFilter,JIAuthenticationSynchronizer,anonymousProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor,switchUserProcessingFilter false false 0xC8 0x43 0x29 0x49 0xAE 0x25 0x2F 0xA1 0xC1 0xF2 0xC8 0xD9 0x31 0x01 0x2C 0x52 0x54 0x0B 0x5E 0xEA 0x9E 0x37 0xA8 0x61 DESede DESede/CBC/PKCS5Padding Select userName as login, password,enabled=1 FROM tblUser WHERE userName=? SELECT login,authority,enabled=1 FROM authorities WHERE login = ? foobar anonymousUser,ROLE_ANONYMOUS foobar en fr it de ro ja zh_TW 86400 Protected Area /login.html?error=1 /loginsuccess.html /j_acegi_security_check /loginerror.html /j_acegi_switch_user /login.html false false CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON PATTERN_TYPE_APACHE_ANT /login.html=ROLE_ANONYMOUS,ROLE_USER,ROLE_ADMINISTRATOR /logout.html=ROLE_ANONYMOUS,ROLE_USER,ROLE_ADMINISTRATOR,IS_AUTHENTICATED_FULLY /loginerror.html=ROLE_ANONYMOUS,ROLE_USER,ROLE_ADMINISTRATOR /exituser.html=ROLE_ANONYMOUS,ROLE_USER,ROLE_ADMINISTRATOR,IS_AUTHENTICATED_FULLY /home.html=ROLE_USER,ROLE_ADMINISTRATOR /flow.html=ROLE_USER,ROLE_ADMINISTRATOR /loginsuccess.html=ROLE_USER,ROLE_ADMINISTRATOR /listolapviews.html=ROLE_USER,ROLE_ADMINISTRATOR /fillparams.html=ROLE_USER,ROLE_ADMINISTRATOR /j_acegi_switch_user*=ROLE_ADMINISTRATOR /fileview/**=ROLE_USER,ROLE_ADMINISTRATOR /olap/**=ROLE_USER,ROLE_ADMINISTRATOR /xmla=ROLE_USER,ROLE_ADMINISTRATOR /services/**=ROLE_USER,ROLE_ADMINISTRATOR /reportimage/**=ROLE_USER,ROLE_ADMINISTRATOR /jrpxml/**=ROLE_USER,ROLE_ADMINISTRATOR /*.html=ROLE_ADMINISTRATOR /*.jsp=ROLE_ADMINISTRATOR class="org.acegisecurity.ui.switchuser.SwitchUserProcessingFilter"> /j_acegi_switch_user /j_acegi_exit_user /home.html org.acegisecurity.acl.basic.SimpleAclEntry.ADMINISTRATION org.acegisecurity.acl.basic.SimpleAclEntry.READ_WRITE org.acegisecurity.acl.basic.SimpleAclEntry.READ org.acegisecurity.acl.basic.SimpleAclEntry.DELETE ACL_USER_ADMIN com.jaspersoft.jasperserver.api.metadata.common.domain.Resource ACL_USER_READ java.lang.String ACL_USER_UPDATE com.jaspersoft.jasperserver.api.metadata.common.domain.Resource ACL_USER_DELETE java.lang.String true class="org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor"> com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService.getResource=ACL_USER_READ com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService.getFolder=ACL_USER_READ com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService.loadResourcesList=AFTER_ACL_COLLECTION_READ com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService.loadClientResources=AFTER_ACL_COLLECTION_READ com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService.getAllFolders=AFTER_ACL_COLLECTION_READ com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService.getSubFolders=AFTER_ACL_COLLECTION_READ com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService.saveFolder=ACL_USER_ADMIN,ACL_USER_UPDATE com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService.saveResource=ACL_USER_ADMIN,ACL_USER_UPDATE com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService.deleteResource=ACL_USER_DELETE com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService.deleteFolder=ACL_USER_DELETE com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService.delete=ACL_USER_DELETE com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService.moveFolder=ACL_USER_MOVE com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService.moveResource=ACL_USER_MOVE com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService.copyResource=ACL_USER_COPY com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService.copyFolder=ACL_USER_COPY class="org.acegisecurity.afterinvocation.BasicAclEntryAfterInvocationCollectionFilteringProvider"> AFTER_ACL_COLLECTION_UPDATE repoAdminFlow=ROLE_ADMINISTRATOR userListFlow=ROLE_ADMINISTRATOR roleListFlow=ROLE_ADMINISTRATOR reportUnitFlow=ROLE_ADMINISTRATOR olapUnitFlow=ROLE_ADMINISTRATOR olapClientConnectionFlow=ROLE_ADMINISTRATOR mondrianXmlaSourceFlow=ROLE_ADMINISTRATOR editFolderFlow=ROLE_ADMINISTRATOR fileResourceFlow=ROLE_ADMINISTRATOR dataTypeFlow=ROLE_ADMINISTRATOR listOfValuesFlow=ROLE_ADMINISTRATOR queryFlow=ROLE_ADMINISTRATOR reportDataSourceFlow=ROLE_ADMINISTRATOR inputControlsFlow=ROLE_ADMINISTRATOR objectPermissionToRoleFlow=ROLE_ADMINISTRATOR userEditFlow=ROLE_ADMINISTRATOR roleEditFlow=ROLE_ADMINISTRATOR queryReferenceFlow=ROLE_ADMINISTRATOR objectPermissionToUserFlow=ROLE_ADMINISTRATOR repositoryExplorerFlow=ROLE_USER,ROLE_ADMINISTRATOR *=ROLE_USER,ROLE_ADMINISTRATOR true org.springframework.webflow.executor.FlowExecutor.launch=FLOW_ACCESS class="com.jaspersoft.jasperserver.api.metadata.user.service.impl.CheckMethodSecurityInterceptor"> class="org.springframework.aop.framework.ProxyFactoryBean"> com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.HibernateRepositoryService class="com.jaspersoft.jasperserver.api.metadata.common.service.impl.RepositoryServiceSecurityChecker"> class="org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor"> com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService.getResource=ACL_USER_UPDATE com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService.getFolder=ACL_USER_UPDATE com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService.loadResourcesList=AFTER_ACL_COLLECTION_UPDATE com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService.loadClientResources=AFTER_ACL_COLLECTION_UPDATE com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService.getAllFolders=AFTER_ACL_COLLECTION_UPDATE com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService.getSubFolders=AFTER_ACL_COLLECTION_UPDATE com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService.saveFolder=ACL_USER_UPDATE com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService.saveResource=ACL_USER_UPDATE com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService.deleteResource=ACL_USER_DELETE com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService.deleteFolder=ACL_USER_DELETE com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService.delete=ACL_USER_DELETE class="org.springframework.aop.framework.ProxyFactoryBean"> com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.HibernateRepositoryService
  14. I'm interested in running jasperserver on a hosted solution (similar to salesforce). Each user is assigned a userid, password and companyid. If I have two companies (companyA and companyB) I only want companyA users to be able to see companyA reports and companyB users to see companyB reports. Is there an easy way to provide this functionality? Thanks in advance, -LeoD
  15. In looking into this issue. I think you can use the spring securities 'userDetailService' that can authenticate users against a jdbc datasource. Using this you would not be required to implement your own userauthority. As soon as I get this working I will post my configuration here for review. BTW) the link to spring securities authentication services is here: http://static.springframework.org/spring-security/site/reference/html/authentication-common-auth-services.html
×
×
  • Create New...