Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

An exception has occurred Can't initialize jni4net Bridge

 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working with templates, docm files, and integrating them with java

I am getting an error as follows:

An exception has occurred Can't initialize jni4net Bridge

it appears that OfficeWriterBridge.j4n.jar is related to this but I don't know how. Also jni4net.-0.8.6.0.jar.

Thanks,
 
Rob Spoor
Sheriff
Pie
Posts: 20608
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you get a full stack trace? If so, can you please post it here?
 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[...]
2012-04-03 16:36:26,682 ERROR [STDERR] Can't initialize jni4net BridgeC:\apps\OfficeWriter\jni4net.n.w64.v40-0.8.6.0.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform
2012-04-03 16:36:26,683 ERROR [STDERR] net.sf.jni4net.inj.INJException: Can't initialize jni4net Bridge
2012-04-03 16:36:26,683 ERROR [STDERR] at net.sf.jni4net.CLRLoader.init(CLRLoader.java:56)
2012-04-03 16:36:26,683 ERROR [STDERR] at net.sf.jni4net.Bridge.init(Bridge.java:46)
2012-04-03 16:36:26,683 ERROR [STDERR] at bcc.pages.documentManagement.DMTemplateLoader.doAction(DMTemplateLoader.java:6227)
2012-04-03 16:36:26,683 ERROR [STDERR] at bcc.lib.BaseDoServlet.doServletFunction(BaseDoServlet.java:30)
2012-04-03 16:36:26,684 ERROR [STDERR] at bcc.lib.BaseBccServlet.doPost(BaseBccServlet.java:102)
2012-04-03 16:36:26,684 ERROR [STDERR] at bcc.lib.BaseBccServlet.doGet(BaseBccServlet.java:54)
2012-04-03 16:36:26,684 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
2012-04-03 16:36:26,684 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
2012-04-03 16:36:26,684 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
2012-04-03 16:36:26,684 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
2012-04-03 16:36:26,684 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
2012-04-03 16:36:26,684 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
2012-04-03 16:36:26,684 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
2012-04-03 16:36:26,684 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
2012-04-03 16:36:26,684 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
2012-04-03 16:36:26,684 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
2012-04-03 16:36:26,684 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
2012-04-03 16:36:26,684 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
2012-04-03 16:36:26,684 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
2012-04-03 16:36:26,684 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
2012-04-03 16:36:26,684 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
2012-04-03 16:36:26,685 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
2012-04-03 16:36:26,685 ERROR [STDERR] at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
2012-04-03 16:36:26,685 ERROR [STDERR] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
2012-04-03 16:36:26,685 ERROR [STDERR] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
2012-04-03 16:36:26,688 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
2012-04-03 16:36:26,689 ERROR [STDERR] Caused by: java.lang.UnsatisfiedLinkError: C:\apps\OfficeWriter\jni4net.n.w64.v40-0.8.6.0.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform
2012-04-03 16:36:26,689 ERROR [STDERR] at java.lang.ClassLoader$NativeLibrary.load(Native Method)
2012-04-03 16:36:26,689 ERROR [STDERR] at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
2012-04-03 16:36:26,689 ERROR [STDERR] at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647)
2012-04-03 16:36:26,689 ERROR [STDERR] at java.lang.Runtime.load0(Runtime.java:769)
2012-04-03 16:36:26,689 ERROR [STDERR] at java.lang.System.load(System.java:968)
2012-04-03 16:36:26,689 ERROR [STDERR] at net.sf.jni4net.CLRLoader.init(CLRLoader.java:47)
2012-04-03 16:36:26,689 ERROR [STDERR] ... 25 more
[...]
2012-04-03 16:38:21,949 ERROR [STDERR] Can't initialize jni4net BridgeC:\apps\OfficeWriter\jni4net.n.w64.v40-0.8.6.0.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform
2012-04-03 16:38:21,949 ERROR [STDERR] net.sf.jni4net.inj.INJException: Can't initialize jni4net Bridge
2012-04-03 16:38:21,950 ERROR [STDERR] at net.sf.jni4net.CLRLoader.init(CLRLoader.java:56)
2012-04-03 16:38:21,950 ERROR [STDERR] at net.sf.jni4net.Bridge.init(Bridge.java:46)
2012-04-03 16:38:21,950 ERROR [STDERR] at bcc.pages.documentManagement.DMTemplateLoader.doAction(DMTemplateLoader.java:6227)
2012-04-03 16:38:21,950 ERROR [STDERR] at bcc.lib.BaseDoServlet.doServletFunction(BaseDoServlet.java:30)
2012-04-03 16:38:21,950 ERROR [STDERR] at bcc.lib.BaseBccServlet.doPost(BaseBccServlet.java:102)
2012-04-03 16:38:21,950 ERROR [STDERR] at bcc.lib.BaseBccServlet.doGet(BaseBccServlet.java:54)
2012-04-03 16:38:21,950 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
2012-04-03 16:38:21,950 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
2012-04-03 16:38:21,950 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
2012-04-03 16:38:21,950 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
2012-04-03 16:38:21,950 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
2012-04-03 16:38:21,950 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
2012-04-03 16:38:21,950 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
2012-04-03 16:38:21,951 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
2012-04-03 16:38:21,951 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
2012-04-03 16:38:21,951 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
2012-04-03 16:38:21,951 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
2012-04-03 16:38:21,951 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
2012-04-03 16:38:21,951 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
2012-04-03 16:38:21,951 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
2012-04-03 16:38:21,951 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
2012-04-03 16:38:21,951 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
2012-04-03 16:38:21,954 ERROR [STDERR] at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
2012-04-03 16:38:21,954 ERROR [STDERR] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
2012-04-03 16:38:21,954 ERROR [STDERR] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
2012-04-03 16:38:21,954 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
2012-04-03 16:38:21,955 ERROR [STDERR] Caused by: java.lang.UnsatisfiedLinkError: C:\apps\OfficeWriter\jni4net.n.w64.v40-0.8.6.0.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform
2012-04-03 16:38:21,955 ERROR [STDERR] at java.lang.ClassLoader$NativeLibrary.load(Native Method)
2012-04-03 16:38:21,955 ERROR [STDERR] at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
2012-04-03 16:38:21,955 ERROR [STDERR] at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647)
2012-04-03 16:38:21,955 ERROR [STDERR] at java.lang.Runtime.load0(Runtime.java:769)
2012-04-03 16:38:21,955 ERROR [STDERR] at java.lang.System.load(System.java:968)
2012-04-03 16:38:21,955 ERROR [STDERR] at net.sf.jni4net.CLRLoader.init(CLRLoader.java:47)
2012-04-03 16:38:21,955 ERROR [STDERR] ... 25 more
 
Rob Spoor
Sheriff
Pie
Posts: 20608
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've removed all the irrelevant logging information. What remains is one error thrown twice. Its message is clear - you have a DLL file compiled for a 64-bit system but are using a 32-bit JVM. Either replace this DLL with one for a 32-bit system, or switch to a 64-bit JVM (this also requires a 64-bit operating system).
 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Makes sense, thanks a lot,
I mean a LOT!!!
Michele
 
Rob Spoor
Sheriff
Pie
Posts: 20608
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome
 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello again, I tried to get rid (delete) the 64 bit one but it caused instability. What should I do, unregister the 64 bit one? I am unsure what to do. BTW, it works okay on the production server, but not on the testing server. Thanks,
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll need to TellTheDetails to us. What "instability" exactly means? Which errors are you getting?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic