BRMS giving "Incompatible magic value 1885430635 in class" exception

An error occurred executing the action.
      
Details
      
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccesso
rImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMetho
dAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvo
cationContext.java:31)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvo
cationContext.java:56)
at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(Rol
lbackInterceptor.java:31)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvo
cationContext.java:68)
at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(Bijection
Interceptor.java:46)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvo
cationContext.java:68)
at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(Metho
dContextInterceptor.java:42)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvo
cationContext.java:68)
at org.jboss.seam.security.SecurityInterceptor.aroundInvoke(Securi
tyInterceptor.java:40)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvo
cationContext.java:68)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor
.java:106)
at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocatio
n(JavaBeanInterceptor.java:155)
at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInt
erceptor.java:91)
at org.drools.brms.server.ServiceImplementation_$$_javassist_3.bui
dAsset(ServiceImplementation_$$_javassist_3.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccesso
rImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMetho
dAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.seam.remoting.gwt.GWTToSeamAdapter.callWebRemoteMetho
d(GWTToSeamAdapter.java:74)
at org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.processCall
(GWTRemoteServiceServlet.java:290)
at org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.doPost(GWTR
emoteServiceServlet.java:172)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilte
r(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Applic
ationFilterChain.java:206)
at org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42)
at org.jboss.seam.servlet.ContextualHttpServletRequest.run(Context
ualHttpServletRequest.java:46)
at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilte
r(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Applic
ationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHe
aderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilte
r(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Applic
ationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWr
apperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardCo
ntextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(S
ecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccConte
xtValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostV
alve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportV
alve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(C
achedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEng
ineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapt
er.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processo
r.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler
.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassFormatError: Incompatible magic
value 1885430635 in class file domain/Accommodation1
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at org.drools.rule.MapBackedClassLoader.fastFindClass(MapBackedCla
ssLoader.java:60)
at org.drools.rule.MapBackedClassLoader.loadClass(MapBackedClassLo
ader.java:79)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.drools.rule.PackageCompilationData$PackageClassLoader.loadC
lass(PackageCompilationData.java:358)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.drools.base.ClassTypeResolver.resolveType(ClassTypeResolver
.java:146)
at org.drools.rule.builder.dialect.mvel.MVELDialect.addImport(MVEL
Dialect.java:254)
at org.drools.compiler.DialectRegistry.addImport(DialectRegistry.java:98)
at org.drools.compiler.PackageBuilder.mergePackage(PackageBuilder.
java:377)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:264)
at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBui
lder.java:167)
at org.drools.brms.server.contenthandler.DecisionTableXLSHandler.c
ompile(DecisionTableXLSHandler.java:63)
at org.drools.brms.server.builder.ContentPackageAssembler.buildAss
et(ContentPackageAssembler.java:139)
at org.drools.brms.server.builder.ContentPackageAssembler.<init(C
ontentPackageAssembler.java:103)
at org.drools.brms.server.ServiceImplementation.buildAsset(Service
Implementation.java:867)
 ... 51 more
LVL 2
SGosukondaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SGosukondaAuthor Commented:
solution is needed.
0
cmalakarCommented:
Seems like your class file is corrupted..
0
SGosukondaAuthor Commented:
I created jar file with that Accommodation1 java calss... by using that jar if i access Accommodation class its giving above error in JBRMS tool.
0
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

cmalakarCommented:
try making the jar again...

extract the class file from the jar..

And try to execute the "javap" with that class..
0
cmalakarCommented:
Actually magic number is the first four bytes of a class file.. its value will be always.. 0xCAFEBABE in hex
0
Ajay-SinghCommented:
Are you sure you are using .class file here?
0
SGosukondaAuthor Commented:
I did it by extract jar and try with javap below message is coming....
C:\ggg\domain>javap Accommodation1
Compiled from "Accommodation1.java"
public class domain.Accommodation1 extends java.lang.Object{
    public java.lang.String getName();
    public void setName(java.lang.String);
    public domain.Accommodation1(java.lang.Long, int, int, java.lang.String, int);
    public domain.Accommodation1();
    public int getPaxConsumed();
    public void setPaxConsumed(int);
    public int getMaxPaxOffered();
    public void setMaxPaxOffered(int);
}


0
cmalakarCommented:
How do you make the jar..

Do you copy the class file from one machine to another machine.. ?
0
SGosukondaAuthor Commented:
No, by using eclipse.
0
cmalakarCommented:
try to jar it manually using the following command...


jar -cvf name.jar Accommodation1.class
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SGosukondaAuthor Commented:
ok.... Thanks cmalakar... thanks for your valuable reply... i will try with ant script to do the jar.. ok.. after if any problem occures surely i will ask... thanks in advance.
0
SGosukondaAuthor Commented:
ok.... Thanks cmalakar... thanks for your valuable reply... i will try with ant script to do the jar.. ok.. after if any problem occures surely i will ask... thanks in advance.
0
SGosukondaAuthor Commented:
Hi All thanks for ur help.
this is working fine after creating the jar file manually.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.