|
Re: createFactoryObject returns null after upgrade of BIRT [message #665730 is a reply to message #665718] |
Fri, 15 April 2011 16:10 |
|
In the runtime directory look for the configuration folder. clear
everything but the config.ini. Try to start it again and see if any
files are generated in this directory.
Jason
On 4/15/2011 11:20 AM, aca wrote:
> Hi,
> After an upgrade of BIRT from version 2.2.1.1 to 2.6.2 I have a similar
> problem as many older bugs I've found in here. I cant find an answer
> that fixes my problem, though.
>
> My problem is that I get a NullPointerException due to that the method
> createFactoryObject returns null. I have verified that the engine path
> is correct, and that all permissions are correct. All the jar-files from
> the lib-library and no other are placed correctly.
>
> Now I'm stuck on what to look at or try to make this work, and I
> appreciate any help on the topic!
>
> The code that generates the nullpointer:
> IReportEngineFactory factory = (IReportEngineFactory)
> Platform.createFactoryObject(IReportEngineFactory.EXTENSION_
> REPORT_ENGINE_FACTORY);
> birtEngine = factory.createReportEngine(config);
>
>
> The log:
> java.lang.NullPointerException
> at com.edb.finance.reporting.util.BirtEngine.getBirtEngine(Birt
> Engine.java:57)
> at com.edb.finance.reporting.impl.ReportEngineServiceImpl.creat
> eReport(ReportEngineServiceImpl.java:147)
> at com.edb.finance.salessupport.reporting.salessupport.bean.use
> case.SalesSupportReportingUseCaseBean.printSalesSupportRepor
> ts(SalesSupportReportingUseCaseBean.java:235)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
> ssorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
> thodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBinding
> Impl.java:129)
> at org.apache.myfaces.application.ActionListenerImpl.processAct
> ion(ActionListenerImpl.java:63)
> at se.lf.bbp.security.authorization.jsf.AuthorizationActionList
> ener.processAction(AuthorizationActionListener.java:78)
> at javax.faces.component.UICommand.broadcast(UICommand.java:106 )
> at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRo ot.java:90)
> at javax.faces.component.UIViewRoot.processApplication(UIViewRo
> ot.java:164)
> at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication
> (LifecycleImpl.java:316)
> at org.apache.myfaces.lifecycle.LifecycleImpl.execute(Lifecycle
> Impl.java:86)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:10 6)
> at weblogic.servlet.internal.StubSecurityHelper$ServletServiceA
> ction.run(StubSecurityHelper.java:227)
> at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(S
> tubSecurityHelper.java:125)
> at weblogic.servlet.internal.ServletStubImpl.execute(ServletStu
> bImpl.java:300)
> at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.jav a:26)
> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterCha
> inImpl.java:56)
> at se.lf.bbp.security.AuthorizationFilter.doFilter(Authorizatio
> nFilter.java:168)
> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterCha
> inImpl.java:56)
> at org.apache.shale.faces.ShaleApplicationFilter.doFilter(Shale
> ApplicationFilter.java:285)
> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterCha
> inImpl.java:56)
> at weblogic.servlet.internal.WebAppServletContext$ServletInvoca
> tionAction.wrapRun(WebAppServletContext.java:3715)
> at weblogic.servlet.internal.WebAppServletContext$ServletInvoca
> tionAction.run(WebAppServletContext.java:3681)
> at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Aut
> henticatedSubject.java:321)
> at weblogic.security.service.SecurityManager.runAs(SecurityMana
> ger.java:120)
> at weblogic.servlet.internal.WebAppServletContext.securedExecut
> e(WebAppServletContext.java:2277)
> at weblogic.servlet.internal.WebAppServletContext.execute(WebAp
> pServletContext.java:2183)
> at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequ
> estImpl.java:1454)
> at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
> at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
>
>
>
>
|
|
|
|
|
Re: createFactoryObject returns null after upgrade of BIRT [message #900392 is a reply to message #900149] |
Mon, 06 August 2012 20:28 |
|
Can you post the complete pom? What libs get downloaded?
Jason
On 8/4/2012 1:41 PM, Omer Akhter wrote:
> Hi
>
> I am new to BIRT. I am using BIRT 4.2
>
> I am facing similar problem. I have a maven project. My BIRT dependency
> looks like this:
>
>
> <dependency>
> <groupId>org.eclipse.birt.runtime</groupId>
> <artifactId>org.eclipse.birt.runtime</artifactId>
> <version>4.2.0</version>
> </dependency>
>
>
> And when I run my application through eclipse, it works fine.
>
> But when I creat a jar with dependencies using maven-assembly-plugin and
> try to run it. The createFactoryObject returns null.
>
> Any help ...?
>
> Thanks
|
|
|
|
Re: createFactoryObject returns null after upgrade of BIRT [message #901067 is a reply to message #900905] |
Thu, 09 August 2012 15:27 |
|
Omer
Can you look at the jars that get downloaded? Do they match the jars in
the runtime download of BIRT 4.2. Specifically the ones in the
reportengine/lib directory of the runtime download?
Jason
On 8/8/2012 7:15 PM, Omer Akhter wrote:
> Thanks for the response Jason.
>
> Here is the pom. I had to strip the urls because: "You can only use
> links to eclipse.org sites while you have fewer than 25 messages."
> <project xmlns=".../POM/4.0.0" xmlns:xsi=".../2001/XMLSchema-instance"
> xsi:schemaLocation=".../POM/4.0.0 .../xsd/maven-4.0.0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <prerequisites>
> <maven>3.0.4</maven>
> </prerequisites>
> <groupId>org.test</groupId>
> <artifactId>reportTest</artifactId>
> <version>0.1</version>
> <packaging>jar</packaging>
> <properties>
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> </properties>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <version>2.5.1</version>
> <configuration>
> <source>1.6</source>
> <target>1.6</target>
> </configuration>
> </plugin>
> <plugin>
> <artifactId>maven-assembly-plugin</artifactId>
> <version>2.3</version>
> <configuration>
> <archive>
> <manifest>
> <mainClass>org.test.reportTest.App</mainClass>
> </manifest>
> </archive>
> <descriptorRefs>
> <descriptorRef>jar-with-dependencies</descriptorRef>
> </descriptorRefs>
> </configuration>
> <executions>
> <execution>
> <phase>package</phase>
> <goals>
> <goal>single</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> <plugin>
> <artifactId>maven-dependency-plugin</artifactId>
> <version>2.4</version>
> <executions>
> <execution>
> <phase>install</phase>
> <goals>
> <goal>copy-dependencies</goal>
> </goals>
> <configuration>
>
> <outputDirectory>${project.build.directory}/lib</outputDirectory>
> </configuration>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
> <dependencies>
> <dependency>
> <groupId>org.eclipse.birt.runtime</groupId>
> <artifactId>org.eclipse.birt.runtime</artifactId>
> <version>4.2.0</version>
> </dependency>
> </dependencies>
> <repositories>
> <!-- <repository>
> <releases>
> <enabled>false</enabled>
> </releases>
> <snapshots>
> <enabled>true</enabled>
> <updatePolicy>daily</updatePolicy>
> <checksumPolicy>ignore</checksumPolicy>
> </snapshots>
> <id>sonatype-nexus-snapshots</id>
> <name>Sonatype Nexus Snapshots</name>
> <url>...oss.sonatype.org/content/repositories/snapshots</url>
> </repository> -->
> <repository>
> <releases>
> <enabled>true</enabled>
> </releases>
> <snapshots>
> <enabled>false</enabled>
> <updatePolicy>daily</updatePolicy>
> <checksumPolicy>ignore</checksumPolicy>
> </snapshots>
> <id>sonatype-nexus-releases</id>
> <name>Sonatype Nexus Snapshots</name>
> <url>...oss.sonatype.org/content/repositories/releases</url>
> </repository>
> </repositories>
|
|
|
Re: createFactoryObject returns null after upgrade of BIRT [message #915170 is a reply to message #901067] |
Sun, 16 September 2012 17:59 |
Omer Akhter Messages: 4 Registered: August 2012 |
Junior Member |
|
|
Thanks for the reply Jason.
Sorry to be this late with reply but I got around the problem. I am posting my solution here so that it might be helpful for someone else.
Yes, I verified the downloaded jars.
What I did to resolve this, however, was to copy the all the dependencies into a folder:
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>${dependency-plugin.version}</version>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
and then added them to classpath.
I was trying to create a single jar so that there may be no hassle in deployment/installation. But it seems to be a better solution to me since if I have a change in my code, I would need to replace my jar only.
[Updated on: Sun, 16 September 2012 18:03] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03848 seconds